Untitled
unknown
plain_text
7 months ago
890 B
1
Indexable
Never
c_counter = 0 o_counter = 0 n_counter = 0 word = "" user_input = input() while user_input != "End": if 65 <= ord(user_input) <= 90 or 97 <= ord(user_input) <= 122: if user_input == "c": if c_counter >= 1: word += user_input else: c_counter += 1 elif user_input == "o": if o_counter >= 1: word += user_input else: o_counter += 1 elif user_input == "n": if n_counter >= 1: word += user_input else: n_counter += 1 else: word += user_input if c_counter == 1 and o_counter == 1 and n_counter == 1: print(word, end=" ") c_counter = 0 o_counter = 0 n_counter = 0 word = "" user_input = input()
Leave a Comment