DEV Community

Discussion on: In Your Opinion, What Makes Code Pythonic?

Collapse
 
oklandon profile image
Landon Young

Use comprehensions (dict, list, etc) when possible. Although it's hip to use immutable structures and other FP approaches right now in programming, it's often more 'pythonic' to use simple imperative patterns and/or mutation since it'll be easier for other maintainers and readers to grok.

the zen of python: python.org/dev/peps/pep-0020/