simeonshopov

Substring

Feb 10th, 2020
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. searched = input()
  2. word = input()
  3.  
  4. def remove(a: str, b: str):
  5.     while True:
  6.         if a not in b:
  7.             break
  8.         else:
  9.             b = b.replace(a, '')
  10.     return b
  11.  
  12.  
  13. print(remove(searched, word))
Advertisement
Add Comment
Please, Sign In to add comment