Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- alp_eng = str(list('''`1234567890-=qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}ASDFGHJKL:"|ZXCVBNM<>?'''))
- alp_rus = str(list('''ё1234567890-=йцукенгшщзхъфывапролджэячсмитьбю.Ё!"№;%:?*()_+ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭ/ЯЧСМИТЬБЮ,'''))
- res = []
- x = input("Введите текст: ")
- for lit in x:
- if lit in alp_eng:
- i = alp_eng.index(lit)
- res.append(alp_rus[i])
- elif lit in alp_rus:
- i = alp_rus.index(lit)
- res.append(alp_eng[i])
- print (''.join(res))
- input ()
Add Comment
Please, Sign In to add comment