Back to Lesson
Complex Keys
Understand what bounds determine dictionary keys.
Instructions
- Create an empty dictionary.
grid = {} - Add a key for the tuplemapping to
(0, 0)."Start" - Use ablock where you attempt to assign
try...except TypeError. In thegrid[[1, 1]] = "Trap"block, printexcept."Invalid key"
main.py
main.py
Ctrl + Enter