Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List_glas = ['а', 'е', 'ё', 'и', 'о', 'у', 'ы', 'э', 'ю', 'я']
- List_sogl = ['б', 'в', 'г', 'д', 'ж', 'з', 'й', 'к', 'л', 'м', 'н', 'п', 'р', 'с', 'т', 'ф', 'х', 'ц', 'ч', 'ш', 'щ', 'ъ', 'ь']
- List_text = []
- New = []
- gls = 0
- sog = 22
- print("Введите сообщение: \n")
- text = input()
- for symbol in text:
- List_text.append(symbol)
- for symbol in range(len(List_text)):
- m = 0
- for sym in range(len(List_glas)):
- if List_text[symbol] == List_glas[sym]:
- m = 1
- for sym in range(len(List_sogl)):
- if List_text[symbol] == List_sogl[sym]:
- m = 2
- if m == 1:
- New.append(List_glas[gls])
- gls += 1
- if gls >= 10:
- gls = 0
- elif m == 2:
- New.append(List_sogl[sog])
- sog -= 1
- if sog <= 0:
- sog = 22
- else:
- New.append(List_text[symbol])
- print(''.join(New))
Advertisement
Add Comment
Please, Sign In to add comment