Thinking of making the codes leaner and more elegant would it be possible to use special characters in the codes? Would you get in trouble?
Thinking of making the codes leaner and more elegant would it be possible to use special characters in the codes? Would you get in trouble?
In general, there is no problem, there is even a PEP that talks how to do it correctly: link .
Of course it does not get you out of trouble because of some external tool that reads the code and is not able to handle it, giving trouble when opening in a bad text editor and stuff. This has been generally addressed in Is there any problem in using Unicode characters for handles in code? . I would not abuse, at most I would use accents.
Lean and elegant do not always go together (there are cases that yes). I can not imagine how special characters can make the code look sleeker and leaner at the same time, though elegant can be a bit subjective.