mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
[pythonlegacy/de-de] Fix typos (#5115)
This commit is contained in:
parent
5938f7f2fc
commit
bacc08e6d8
@ -192,7 +192,7 @@ d, e, f = 4, 5, 6
|
|||||||
e, d = d, e # d is now 5 and e is now 4
|
e, d = d, e # d is now 5 and e is now 4
|
||||||
|
|
||||||
|
|
||||||
# Dictionarys (Wörterbucher) speichern Key-Value-Paare
|
# Dictionarys (Wörterbücher) speichern Key-Value-Paare
|
||||||
empty_dict = {}
|
empty_dict = {}
|
||||||
# Hier ein gefülltes Wörterbuch
|
# Hier ein gefülltes Wörterbuch
|
||||||
filled_dict = {"one": 1, "two": 2, "three": 3}
|
filled_dict = {"one": 1, "two": 2, "three": 3}
|
||||||
@ -213,7 +213,7 @@ filled_dict.values() #=> [3, 2, 1]
|
|||||||
"one" in filled_dict #=> True
|
"one" in filled_dict #=> True
|
||||||
1 in filled_dict #=> False
|
1 in filled_dict #=> False
|
||||||
|
|
||||||
# Einen nicht vorhandenenen Schlüssel zu suchen, löst einen KeyError aus
|
# Einen nicht vorhandenen Schlüssel zu suchen, löst einen KeyError aus
|
||||||
filled_dict["four"] # KeyError
|
filled_dict["four"] # KeyError
|
||||||
|
|
||||||
# Mit der get-Methode verhindern wir das
|
# Mit der get-Methode verhindern wir das
|
||||||
|
Loading…
Reference in New Issue
Block a user