Skip to content

Instantly share code, notes, and snippets.

@servusdei2018
Created February 6, 2020 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save servusdei2018/e7b4485a65e9b3dadba36d38216d84a2 to your computer and use it in GitHub Desktop.
Save servusdei2018/e7b4485a65e9b3dadba36d38216d84a2 to your computer and use it in GitHub Desktop.
Make English text look Russian
'''
"Russianize" English text to make it look Russian.
Note: This works best when most of the letters are UPPERCASE.
'''
table = {
'R': 'Я',
'r': 'Г',
'N': 'И',
'n': 'П',
'A': 'Д',
'O': 'Ф',
'W': 'Ш',
'X': 'Ж',
'E': 'Э',
'U': 'Ц',
'Y': 'Ч'
}
def main():
while True:
russianize(input('Enter text to be Russianized >'))
def russianize(s):
for entry in table:
s = s.replace(entry, table[entry])
print(s)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment