Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def control_string_boolean(stringA,stringB,N):
- #@ param stringA : string con lungha 1
- #@ param stringB : string
- #@ param N : int
- S=stringA in stringB
- if not stringA in stringB and N==0:
- return true
- elif stringA in stringB and N==0:
- return false
- if stringA in stringB:
- I=stringB.find(stringA)
- stringB=stringB[0:I]+stringB[I+1:]
- if N>1:
- #print"vuoi sapere se la stringa '%s' e' presente per la %i volta nella stringa '%s'" %(stringA,N,stringB)
- return control_string_boolean(stringA,stringB,N-1)
- return S
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement