Dict() Flashcards

1
Q

Erzeuge ein neues leeres Dictionary

A

Dict = {}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Liefere den Wert für Schlüssel k im Dictionary d

A

D[k]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Teste, ob der Schlüssel k im Dictionary d vorkommt

A

K in d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Füge Schlüssel/Wertpaar k/v in das Dictionary d ein; falls Schlüssel k bereits existiert, überschreibe den bisherigen Wert

A

D[k] = v

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Liefere Liste der Schlüssel des Dictionaries d in beliebiger Ordnung

A

D.keys()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Liefere Liste der Werte des dictionaries d in beliebiger Ordnung

A

D.values()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Liefere Liste der Schlüssel/Wertpaare des Dictionaries d in beliebiger Reihenfolge

A

D.items ()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly