File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6565print (len (Tuple ))
6666
6767
68- # 3. Das Dictonary :
68+ # 3. Das Dictionary :
6969
70- # Ein Dictonary ist eine unsortierte Liste, in der
70+ # Ein Dictionary ist eine unsortierte Liste, in der
7171# immer einem key ein value zugeordnet ist.
7272
73- # Ein Dictonary wird über geschweifte Klammern
73+ # Ein Dictionary wird über geschweifte Klammern
7474# definiert:
75- Dictonary = {"Eins" :"one" , "Zwei" :"two" }
76- print (Dictonary )
75+ dictionary = {"Eins" :"one" , "Zwei" :"two" }
76+ print (dictionary )
7777
7878# Auf einen value wird mit Hilfe des keys zu-
7979# gegriffen:
80- print (Dictonary ["Eins" ])
80+ print (dictionary ["Eins" ])
8181
8282# Ein neues Key-Value-Paar wird erstellt,
8383# indem auf ein nicht existirenden Value zu-
8484# gegriffen wird und dieser definiert wird:
85- Dictonary ["Wasser" ] = "water"
86- print (Dictonary )
85+ dictionary ["Wasser" ] = "water"
86+ print (dictionary )
8787
8888# Mit len() lässt sich die Länge ausgeben:
89- print (len (Dictonary ))
89+ print (len (dictionary ))
9090
9191
9292
You can’t perform that action at this time.
0 commit comments