Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = []
- while True:
- a = input('Введите латинское слово: ')
- if a == '':
- break
- else:
- if a.isalpha():
- if a[-3:] == 'ere' or a[-2:] in ['re', 'ri'] or a[-1] == 'i':
- x.append(a)
- with open('words.txt', 'w', encoding='utf-8') as f:
- for s in x:
- f.write(s + '\n')
RAW Paste Data