Advertisement
bl00dt3ars

Special symbols

May 25th, 2021
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. special_symbols = "@#$^"
  2. collection = input().split()
  3.  
  4. for item in collection:
  5.     ticket = item.strip()
  6.     current_ticket = [el for el in ticket if el not in special_symbols]
  7.     if not len(ticket) == 20:
  8.         print("invalid ticket")
  9.     elif not len(current_ticket) == len(ticket):
  10.         print(f'ticket "{ticket}" - no match')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement