3 ms·
Great post! For those who know Python, this may be common knowledge, but for the uninitiated, this is a great showcase of some simple ways that Python makes cod
by gamegoblin 14y ago
Great post! For those who know Python, this may be common knowledge, but for the uninitiated, this is a great showcase of some simple ways that Python makes coding more intuitive and enjoyable.
You might also consider mentioning both dictionary and set comprehensions along with list comprehensions, as they are the exact same concept, yet even a lot of intermediate Python programmers don't know about them!
- mburst 14y agoThanks for the idea! I added a dictionary comprehension section.
- Luyt 14y agoExcept the silly 'False = True' at the end. How's that useful?
- gamegoblin 14y agoI think it's just demonstrating how its possible to redefine even Python keywords.