Python

Write an awesome doc for Python. A very nice an practical one extracted from Python official documentation.

View on GitHub

Sequences

Tuples

[!TIP]

  • Empty tuples are constructed by an empty pair of parentheses.
  • Tuple with one item is constructed by following a value with a comma.

Unpacking & Packing

unpacking packing

[!NOTE]

  • Works for any sequence on the right-hand side.
  • There should as many variables on the left side of the equals sign as there are elements in the sequence.

Sets

YouTube/Aparat

Ref