Dictionaries | SoloLearn: Learn to code for FREE!



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


1 Answer

New Answer


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)