Frequently Asked Python Program 22:Find Sub string Presence in a String

Frequently Asked Python Program 22:Find Sub string Presence in a String

SDET- QA

4 года назад

38,455 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

bhagyaboti roy
bhagyaboti roy - 28.07.2023 08:11

i watch your whole playlist , It is very helpful for beginners to make their basics strong.

Ответить
Abhinav Chetti
Abhinav Chetti - 08.04.2023 15:20

string='hi abhinav ,how do you do?'
substr='abhinav'
if substr in string:
print ('yes')
else:
print("no")

Ответить
VISION STATUS
VISION STATUS - 25.10.2022 20:52

str="welcome to python programming")
Sub_str ="python"
For i in str:
If i ==Sub_str:
Print(str.index(i))
Else:
Print(-1)

Ответить
j v ramana
j v ramana - 04.01.2021 20:36

I faced these questions in mercedes benz

Find the longest substring of chars in descending order from the input string:
Example:
input String: “abctsrutkjglyfb”

there are 2 descending order substring: tsr and utkjg

longest descending sub string: “utkjg”

Find the total numbers of occurrences of character in string and calculate the summation of all total occurances.
Example:

String: “abxylaclybb”

Output: a=2,b=3,c=1,x=1,y=2,l=2

2+3+1+1+2+2 = 11

Given a paper of size LxB. cut the paper into squares of any size. Find the minimum number of squares that can be cut from the paper.
Example:
Input : 4 x 5

Output : 5

Explanation :

1 (squares of size 4x4) +

4 (squares of size 1x1)

Ответить
Gayatri Nakar
Gayatri Nakar - 30.07.2020 18:26

how woujd you do this if you had mutile "python" in your str? what if you wanted to find the number of times "python" was repeated in your str? please answer

Ответить
07_Shivani Murde
07_Shivani Murde - 07.06.2020 16:13

ur vedios r so good.....cane u please explain subarray concept?

Ответить
Kv Nagendra
Kv Nagendra - 04.11.2019 14:09

Bro ur videos really helpful for python pursuers

Ответить