I'd like to take out the values I want from the list in the form of a list. For example, x=[[1,2,3,4],[10,20,30,40],[100,110,120,130]] What should I do if I want to get the output value [1,30,110] by taking out the output value I think I can use the overlapping for statement, but it's hard to do it.
x=[[1,2,3,4],[10,20,30,40],[100,110,120,130]]
Output value: [1,30,110]
python list
I think it was difficult because it was an overlapping list.
It's a simple approach.
x=[[1,2,3,4],[10,20,30,40],[100,110,120,130]]
[x[0][0], x[1][2], x[2][1]]
[1, 30, 110]
© 2024 OneMinuteCode. All rights reserved.