Python Tricks: “for” (and “while”) loops can have an “else” branch?!00Share on PinterestThere are no images.0000
Python Tricks: Python 3.3+ has a new “faulthandler” std lib module00Share on PinterestThere are no images.0000
Python Tricks: Python’s namedtuples can be a great alternative to defining a class manually00Share on PinterestThere are no images.0000
Python Tricks: You can use “json.dumps()” to pretty-print Python dicts00Share on PinterestThere are no images.0000
Python Tricks: Measure the execution time of small bits of Python code with the “timeit” module00Share on PinterestThere are no images.0000
Python Tricks: Python’s shorthand for in-place value swapping00Share on PinterestThere are no images.0000
Python Tricks: Functions are first-class citizens in Python00Share on PinterestThere are no images.0000