8467 shaares
202 private links
202 private links
- use
product
instead of nested python for-loops - use the walrus operator for assignment expressions
- use ternary conditional operator if the assignment is simple
- use lambda function to define simple functions
- use list comprehensions
- leverage the Higher Order functions of python such as map and other iterable functions.
- use union operators to merge dictionaries
- use f-strings to format strings
- use asteriks for unpacking iterables and destructuring assignment