Last active
December 20, 2023 02:29
-
-
Save sloanlance/8aff360e474a065c472ed1a4cd05762a to your computer and use it in GitHub Desktop.
Python's handling of Unicode-character variables is surprising!
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
๐ = {'๐': 5} | |
for โน๏ธ in range(20): | |
# print(i, โน๏ธ, i == โน๏ธ) # NameError: name 'i' is not defined. | |
for _,__ in ๐.items(): | |
if __ == โน๏ธ: | |
print(_, โน๏ธ) | |
print(๐) # Prints dictionary in ๐ | |
print(A) # Also prints dictionary in ๐! | |
print(๐ is A) # True | |
๐ต๐ฒ๐น๐น๐ผ = 'Hello' | |
print(๐ต๐ฒ๐น๐น๐ผ) # Hello | |
print(hello) # Hello | |
print(๐ต๐ฒ๐น๐น๐ผ is hello) # True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment