Advertisement
webbersof

Untitled

Oct 16th, 2021
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. c, o, n = 0, 0, 0
  2. string = ''
  3. while True:
  4.  
  5.     letter = input()
  6.  
  7.     if c == 1 and o == 1 and n == 1:
  8.         print(f'{string} ', end='')
  9.         c, o, n = 0, 0, 0
  10.         string = ''
  11.  
  12.     if letter == 'End':
  13.         break
  14.  
  15.     if letter.isalpha():
  16.  
  17.         if letter in 'con':
  18.             if letter == 'c':
  19.                 if c == 0:
  20.                     c = 1
  21.                 else:
  22.                     string += letter
  23.             elif letter == 'o':
  24.                 if o == 0:
  25.                     o = 1
  26.                 else:
  27.                     string += letter
  28.             elif letter == 'n':
  29.                 if n == 0:
  30.                     n = 1
  31.                 else:
  32.                     string += letter
  33.         else:
  34.             string += letter
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement