DiYane

String Pureness

Jul 2nd, 2023 (edited)
1,136
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | Help | 1 0
  1. n = int(input())
  2.  
  3. for _ in range(n):
  4.     string = input()
  5.  
  6.     if ',' in string or '.' in string or '_' in string:
  7.         print(f"{string} is not pure!")
  8.     else:
  9.         print(f"{string} is pure.")
  10.  
Advertisement
Add Comment
Please, Sign In to add comment