Dictionaries | SoloLearn: Learn to code for FREE!

+1

Dictionaries

For calling Dictionaries arguments, rather than calling by key name (red, yellow ...) is it possible to call like lists ? for example: primary [0] --> "red" or [255, 0, 0] https://code.sololearn.com/cbEWc1yZRsQM/?ref=app

1/29/2018 1:17:12 PM

NIMA

1 Answer

New Answer

+1

Do you want to iterate through all items in dictionary without knowing the key names? for k, v in d.items(): print(k) print(v)