Advertisement
Guest User

Untitled

a guest
Mar 16th, 2018
1,446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. STR = ""
  2. stringa=input(" Inserisci stringa da analizzare ")
  3. strtofind=input (" inserisci la stringa cercare ")
  4. while stringa !="":
  5. if strtofind in stringa :
  6. ind = stringa.find(strtofind)
  7. for i in range (ind):
  8. STR = STR + stringa [i]
  9. for i in range (ind+1+len(strtofind),len(stringa)):
  10. STR = STR + stringa [i]
  11. print (STR)
  12. stringa=input(" Inserisci stringa da analizzare ")
  13. strtofind=input (" inserisci la stringa cercare ")
  14. STR = ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement