mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 01:00:13 -04:00
915 B
915 B
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 65b7cf140d34058d7ea8935f | Крок 10 | 20 | step-10 |
--description--
Якщо ви хочете ітерувати над значеннями ключів словника, можна використати метод .values().
Змініть цикл for, щоб він ітерував над copper.values(), а не copper та гляньте на результат.
--hints--
Змініть цикл for, щоб ітерувати над copper.values(), а не copper.
({ test: () => assert(runPython(`_Node(_code).find_for_loops()[0].find_for_iter().is_equivalent("copper.values()")`)) })
--seed--
--seed-contents--
--fcc-editable-region--
copper = {
'species': 'guinea pig',
'age': 2
}
copper['food'] = 'hay'
copper['species'] = 'Cavia porcellus'
for i in copper:
print(i)
--fcc-editable-region--