bounslay

Untitled

May 17th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. title = input()
  2. for _ in range(int(input())):
  3.     temp_title = input()
  4.     new_word = ''
  5.     for i in title:
  6.         if temp_title != '' and i == temp_title[0]:
  7.             temp_title = temp_title[1:]
  8.         else:
  9.             new_word += i
  10.     if temp_title == '':
  11.         title = new_word
  12.         print(title)
  13.     else:
  14.         print("No such title found!")
Advertisement
Add Comment
Please, Sign In to add comment