Python Tip #83 (of 365):

Don't overuse variables in Python.

Expressions are valid almost anywhere in Python.

If a variable name isn't needed to refer to a value multiple times AND the variable name isn't any clearer than the Python expression that produces its value, just use the expression instead.

๐Ÿงต (1/4)

#Python #DailyPythonTip

@treyhunner One of the things in my team's style guide is "Avoid one off variables unless they improve readability." I find there are some, but not many, cases where they do.