Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. def remove_all_from_string(string1, string2):
  2. while string2 in string1:
  3. index = string1.find(string2)
  4. string1 = string1[:index] + string1[index:]
  5.  
  6. remove_all_from_string("zoo", "z")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement