As some of you probably know, you can use λ,φ,α,.., in any julia script. Couldnt this also be possible for python? I would use julia, but there are still some packages from python which I would have to wrap.
Best wishes
Python 3 supports λ,φ,α and many other Unicode characters in identifiers (as mentioned by @jwodder). In jupyter notebook, you can access these characters by typing
\<character name><tab>
Example
\alpha<tab> = 1
# α = 1
Not all Unicode characters can be used as variable names, e.g. emojis:
>>> ♥ = "love"
File "<ipython-input-29-97d253080b57>", line 1
♥ = "love"
^
SyntaxError: invalid character in identifier
However, letter-like characters are allowed, particularly in foreign languages:
>>> αγαπώ = "love"
>>> люблю = "love"
>>> 愛 = "love"
See also David Beazley's talk Mastering Python 3 I/O for more on practical uses of Unicode.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With