Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- special_symbols = "@#$^"
- collection = input().split()
- for item in collection:
- ticket = item.strip()
- current_ticket = [el for el in ticket if el not in special_symbols]
- if not len(ticket) == 20:
- print("invalid ticket")
- elif not len(current_ticket) == len(ticket):
- print(f'ticket "{ticket}" - no match')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement