Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Unpacking

Extracting values from iterables directly into variables or function arguments.

Covered

  • Unpacking a list into function arguments with *
  • Unpacking a tuple into variables
  • Unpacking a function's return value
  • Star operator *rest to capture remaining elements
  • Unpacking with zip
  • zip_longest from itertools for iterables of unequal length

Run

python unpacking.py