0

Print a élément of dictionary (thé dictionary is in a list)

s=[{'a':1},{'b':2}] I want to print 1 and 0 How to do it

11th Sep 2019, 1:15 PM
iren yeger
iren yeger - avatar
2 ответов
+ 4
print(s[0]['a']) # 1 print(s[0]['b']) # 2
11th Sep 2019, 1:38 PM
Diego
Diego - avatar
0
Thank you Diego
11th Sep 2019, 1:42 PM
iren yeger
iren yeger - avatar