Categories
How to get element 2 from nested list?
For example a=[1,2,3] b=[a[1],999],[a[2],100],[a[2],400] how to get 999 ,100,400 ? and fold them
Answer the question
In order to leave comments, you need to log in
You can get it like this:b[0][1], b[1][1], b[2][1]
b[0][1], b[1][1], b[2][1]
sum(x[1] for x in b)
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question