Phase: 3. Data Structures
Estimated Time: 1.5 hours
Milestone: No
Master unpacking and multiple assignment in Python — from basic tuple unpacking to extended unpacking with the * operator.
- Tuple/list unpacking
- Swapping variables
- Extended unpacking with
*(star) _for throwaway values- Unpacking in
forloops - Unpacking function return values
- Unpack sequences into individual variables
- Swap variables in a single line
- Use
*for extended unpacking of remaining elements - Use
_to ignore values during unpacking - Unpack in
forloops and function returns
- Modules 000–026