Last active
January 29, 2020 15:36
-
-
Save theminer3746/1e3e14dfe1e9957a1616b8ad2d047fab to your computer and use it in GitHub Desktop.
When you forgot to change your keyboard from Thai to English (or vice versa) and can't be ask to retype your message
This file contains 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
str1 = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:\"ZXCVBNM<>?" | |
str2 = "_ๅ/-ภถุึคตจขชๆไำพะัีรนยบลฃฟหกดเ้่าสวงผปแอิืทมใฝ%+๑๒๓๔ู฿๕๖๗๘๙๐\"ฎฑธํ๊ณฯญฐ,ฅฤฆฏโฌ็๋ษศซ.()ฉฮฺ์?ฒฬฦ" | |
in_text = input().strip() | |
out_text = '' | |
for char in in_text: | |
for i in range(0, len(str1)): | |
if str1[i] == char: | |
out_text += str2[i] | |
break | |
elif str2[i] == char: | |
out_text += str1[i] | |
break | |
print(out_text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment