Back to Lesson
Dictionary Building via Zip
Instantiate dicts combining external label and data sequences.
Instructions
- Givenand
headers = ["ID", "Name", "Role"].row = [101, "Alice", "Admin"] - Construct a dictionary mapping each header key to its respective row value.
- You can use thekeyword paired exclusively with
dict()to achieve this dynamically and effortlessly! Print the resulting map.zip(...)
main.py
main.py
Ctrl + Enter