Advertisement
DannyDonkov

String Pureness

Jan 13th, 2023
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. num_of_strings = int(input())
  2. string_name = ""
  3. ch_1 = ","
  4. ch_2 = "."
  5. ch_3 = "_"
  6. for i in range(num_of_strings):
  7.     word = input()
  8.     string_name = word
  9.     if ch_1 in word:
  10.         print(f"{string_name} is not pure!")
  11.     elif ch_2 in word:
  12.         print(f"{string_name} is not pure!")
  13.     elif ch_3 in word:
  14.         print(f"{string_name} is not pure!")
  15.     else:
  16.         print(f"{string_name} is pure.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement