def stringmethod(para, special1, special2, list1, strfind):
word1=""
for letter in para:
if letter not in special1:
word1+=letter
wordn=word1[0:70]
rword2=wordn[::-1]
print(rword2)
rword2=rword2.replace(" ","")
print(special2.join(rword2))
list3=[]
if all(SearchStr in para for SearchStr in list1):
print("Every string in %s were present" %list1)
else:
print("Every string in %s were not present" %list1)
new=word1.split()
print(new[:20])
lesscount=[]
emtdis=dict()
for i in new:
emtdis[i]=emtdis.get(i,0)+1
for index,ele in emtdis.items():
if ele<3:
lesscount.append(index)
print(lesscount[-20:])
print(word1.rfind(strfind))
Comments
Post a Comment