0

Python +Json

How to Get values from dictionary in For loop

4th Apr 2019, 7:40 PM
Hariram Balakrishnan
Hariram Balakrishnan - avatar
3 odpowiedzi
+ 10
d = {1:'a',2:'b',3:'c',4:'d'} for v in d.values(): print(v) you can also use: for k,v in d.items(): print(v) for k in d: print(d[k]) Is that what you need ?
4th Apr 2019, 10:15 PM
Cépagrave
Cépagrave - avatar
5th Apr 2019, 1:09 AM
Tibor Santa
Tibor Santa - avatar
+ 4
There is a Module 'JSON' you can use.
4th Apr 2019, 10:20 PM
Sebastian Keßler
Sebastian Keßler - avatar