Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- is_end = False
- msg = ''
- occur_c = False
- occur_o = False
- occur_n = False
- while occur_c == False or occur_o == False or occur_n == False:
- sym = input()
- if sym == 'End':
- is_end = True
- break
- if sym[0] == 'c' and occur_c == False:
- occur_c = True
- continue
- elif sym[0] == 'o' and occur_o == False:
- occur_o = True
- continue
- elif sym[0] == 'n' and occur_n == False:
- occur_n = True
- continue
- if (sym[0] >= 'a' and sym[0] <= 'z') or (sym[0] >= 'A' and sym[0] <= 'Z'):
- msg += sym[0]
- if is_end == True:
- break
- print(f'Message: {msg}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement