mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 01:00:13 -04:00
791 B
791 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 65b7d25992879698180e6a71 | Step 11 | 20 | step-11 |
--description--
Finally, if you want to be able to go through the key-value pairs, you can use the .items() method.
Modify your for loop to iterate over copper.items() instead of copper.values().
--hints--
You should mmodify your for loop to iterate over copper.items() instead of copper.values().
({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.items()")`)) })
--seed--
--seed-contents--
--fcc-editable-region--
copper = {
'species': 'guinea pig',
'age': 2
}
copper['food'] = 'hay'
copper['species'] = 'Cavia porcellus'
for i in copper.values():
print(i)
--fcc-editable-region--