Guest User

06. String Pureness

a guest
Nov 30th, 2022
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | Source Code | 0 0
  1. n = int(input())
  2.  
  3. flag = False
  4. for num in range(n):
  5.     text = input()
  6.     for i in text:
  7.         if i in(".",",","_"):
  8.             print(f'{text} is not pure!')
  9.             flag = True
  10.             break
  11.     if not flag:
  12.         print(f'{text} is pure.')
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment