Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def remove_all_from_string(string1, string2):
- while string2 in string1:
- index = string1.find(string2)
- string1 = string1[:index] + string1[index:]
- remove_all_from_string("zoo", "z")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement