bl00dt3ars

01. Valid Usernames

Aug 3rd, 2021 (edited)
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. usernames = input().split(", ")
  2.  
  3. for username in usernames:
  4.     if 3 <= len(username) <= 16:
  5.         invalid_symbols = [el for el in username if not el.isdigit() and not el.isalpha() and not el == "-" and not el == "_"]
  6.         if len(invalid_symbols) == 0:
  7.             print(username)
Add Comment
Please, Sign In to add comment