count characters in string python
>>> sentence = 'Mary had a little lamb'
>>> sentence.count('a')
4
count characters in string python
>>> sentence = 'Mary had a little lamb'
>>> sentence.count('a')
4
giving number of letter in python
'''for i in range(1,100,50): #it means count from 1 to 100 and increase by 50
print(i)'''
def find_short(s):
li = list(s.split(" "))
sc=[]
for i in range(0,len(li)):
sc.append(len(li[i]))
return min(sc)
print(find_short("bitcoin take over the world maybe who knows perhaps"))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us