Put in order · Python course · Module 2: Data Structures

Working with a Dictionary - Full Cycle

Arrange the steps for building a catalog:

Items to put in order

  • catalog['Tiger'] = {'weight': 200}
  • catalog = {}
  • catalog['Elephant'] = {'weight': 5000}
  • for name, data in catalog.items():
Show the answer

Correct order:

  1. catalog = {}
  2. catalog['Tiger'] = {'weight': 200}
  3. catalog['Elephant'] = {'weight': 5000}
  4. for name, data in catalog.items():