Seite 1 von 1

Leere(s) Liste/Dictionary füllen

Verfasst: Freitag 17. Januar 2020, 13:53
von Lauraella97
Hallo :D ,

ich würde gerne ein leeres Dictionary oder eine Liste befüllen. Wie macht man das?
Bei Liste ginge das mit .append bzw. .extend soweit ich weiß, aber wie macht man das mit einem Dictionary?

Beste Grüße und lieben Dank,

Laura

Re: Leere(s) Liste/Dictionary füllen

Verfasst: Freitag 17. Januar 2020, 14:10
von __deets__
data[schlüssel] = wert

zum Beispiel. Hast du mal in das offizielle Tutorial geschaut? Da sollte das alles besprochen sein.

Re: Leere(s) Liste/Dictionary füllen

Verfasst: Freitag 17. Januar 2020, 14:40
von Jankie
Alles zu Dictionarys findest du hier: https://py-tutorial-de.readthedocs.io/d ... ctionaries