Last active
August 8, 2020 16:45
-
-
Save rzrn/67edb80b8ba77da7d0349a5689c86fc3 to your computer and use it in GitHub Desktop.
Chinazator 9000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import choice | |
from sys import argv | |
alphabet = { | |
'А': list("丹升什闩"), 'Б': list("石右五"), | |
'В': list("归乃巧日扫丑"), 'Г': list("厂广"), | |
'Д': list("亼 囗"), 'Е': list("巨乞仨巳它正臣亖"), | |
'Ё': ["庄"], 'Ж': list("水卌兴川氽米"), 'З': list("乡弓了"), | |
'И': ["仈"], 'Й': list("订计认"), 'К': list("片长"), 'Л': list("几人穴入"), | |
'М': list("从册爪"), 'Н': list("廾卄"), 'О': ["口"], | |
'П': list("冂门刀"), 'Р': list("卩户尸"), 'С': list("匚仁亡"), | |
'Т': list("丁丅"), 'У': ["丫"], 'Ф': ["中"], 'Х': ["乂"], 'Ц': ["凵"], | |
'Ч': ["丩"], 'Ш': ["山"], 'Щ': ["山"], 'Ы': ["辷丨"], 'Э': list("彐刁当"), | |
'Ю': list("扣仰"), 'Я': list("牙兑兄只"), 'Ь': ["辷"], 'A': list("丹升什闩"), | |
'B': list("归乃巧日扫丑"), 'C': list("匚仁亡"), 'D': ["力"], | |
'E': list("巨乞仨巳它正臣"), 'F': list("下彳"), 'G': list("呂马"), | |
'H': list("廾卄"), 'I': list("丨工"), 'J': ["亅"], | |
'K': list("片长"), 'L': list("乚心"), 'M': list("从册"), 'N': ["卜丨"], | |
'O': list("口囗"), 'P': list("户尸"), 'Q': ["贝"], 'R': list("尺夬只艮"), | |
'S': list("丂与"), 'T': ["丁"], 'U': list("凵"), 'W': list("山屮"), | |
'X': ["乂"], 'Y': ["丫"], 'Z': ["乙"] | |
} | |
def chconv(ch): | |
ch = ch.upper() | |
if ch in alphabet: | |
return choice(alphabet[ch]) | |
else: | |
return ch | |
conv = lambda s: ''.join(map(chconv, s)) | |
argv.pop(0) | |
print(" ".join(map(conv, argv))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment