Skip to content

Commit 9ac7cd9

Browse files
adelpopelkovaencukou
authored andcommitted
Refer to the correct dictionary
`popsiy_funkci` is mentioned later
1 parent f299639 commit 9ac7cd9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lessons/beginners/dict/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Kdybys chtěl{{a}} projít místo klíčů hoodnoty, použij metodu `values`,
125125
která vrací iterátor hodnot:
126126

127127
```pycon
128-
>>> for hodnota in popisy_funkci.values():
128+
>>> for hodnota in slovnik.values():
129129
... print(hodnota)
130130
Apple
131131
Button
@@ -138,7 +138,7 @@ K tomu mají slovníky metodu `items`, která vrací iterátor dvojic.
138138
`zip` nebo `enumerate`:
139139

140140
```pycon
141-
>>> for klic, hodnota in popisy_funkci.items():
141+
>>> for klic, hodnota in slovnik.items():
142142
... print('{}: {}'.format(klic, hodnota))
143143
Jablko: Apple
144144
Knoflík: Button
@@ -158,8 +158,8 @@ V průběhu iterace (tedy v rámci `for` cyklu) nesmíš
158158
do slovníku přidávat záznamy, ani záznamy odebírat:
159159

160160
```python
161-
>>> for klic in popisy_funkci:
162-
... del popisy_funkci[klic]
161+
>>> for klic in slovnik:
162+
... del slovnik[klic]
163163
Traceback (most recent call last):
164164
File "<stdin>", line 1, in <module>
165165
RuntimeError: dictionary changed size during iteration

0 commit comments

Comments
 (0)