Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- title_str = input()
- for _ in range(int(input())):
- substring = input()
- new_word = ''
- for char in title_str:
- if substring != '' and char == substring[0]:
- substring = substring[1:]
- else:
- new_word += char
- if substring == '':
- title_str = new_word
- print(title_str)
- else:
- print("No such title found!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement