Комментарии:
i watch your whole playlist , It is very helpful for beginners to make their basics strong.
Ответитьstring='hi abhinav ,how do you do?'
substr='abhinav'
if substr in string:
print ('yes')
else:
print("no")
str="welcome to python programming")
Sub_str ="python"
For i in str:
If i ==Sub_str:
Print(str.index(i))
Else:
Print(-1)
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)
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
Ответитьur vedios r so good.....cane u please explain subarray concept?
ОтветитьBro ur videos really helpful for python pursuers
Ответить