sp = iter(special1)
for i in sp:
para = [Link](i, "")
word1 = para
st = word1[0:70]
rword2 = st[::-1]
print(rword2)
rword2 = [Link](" ", "")
rword2 = [Link](rword2)
print(rword2)
count = 0
for i in list1:
if (i in para):
count = count + 1
else:
pass
if (count > 0):
print("Every string in " + str(list1) + " were present")
else:
print("Every string in " + str(list1) + " were not present")
word1_list = list([Link](" "))
word2 = word1_list[0:20]
print(word2)
x = []
for i in word1_list:
if word1_list.count(i) < 3 and i not in x:
[Link](i)
print(x[-20:])
print([Link](strfind))
Python 3 - Functions and OOPs_FP1. hands on python string methods## Complete the
'strmethod' function below.## The function accepts following parameters:# 1. STRING
para# 2. STRING spch1# 3. STRING spch2# 4. LIST li1# 5. STRING strf#def
stringmethod(para, special1, special2, list1, strfind):for myChar in special1:para
= [Link](myChar,"")word1=pararword2=word1[69::-
1]print(rword2)myspaceremove=[Link](" ",
"")myspaceremove=[Link](" ", "")myword=
[Link](myspaceremove)print(myword)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)number=word1splitAll =
[Link]()print(splitAll[0:20])mylist=[]myDict = dict()for t in
splitAll:myDict[t]=[Link](t,0)+1for x,y in
[Link]():if(y<3):[Link](x)print(mylist[-
20:])print([Link](strfind))
def stringmethod(para, special1, special2, list1, strfind):
for myChar in special1:
para = [Link](myChar,"")
word1=para
rword2=word1[69::-1]
print(rword2)
myspaceremove=[Link](" ", "")
myspaceremove=[Link](" ", "")
myword= [Link](myspaceremove)
print(myword)
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)
number=word1
splitAll = [Link]()
print(splitAll[0:20])
mylist=[]
myDict = dict()
for t in splitAll:
myDict[t]=[Link](t,0)+1
for x,y in [Link]():
if(y<3):
[Link](x)
print(mylist[-20:])
print([Link](strfind))
x = 0
for i in range(2,num):
if(len([j for j in range(2,i-1) if i%j==0]) == 0):
x = x + 1
if(int(val) == 0):
if (x % 2) == 0:
yield i
if(int(val) == 1):
if (x % 2) != 0:
yield i