python - How to select a row from a 2D tuple -


this straightforward thing can't it.

how go selecting "rows" (i use word row lack of better one) 2d (or nd) tuple?

a = [0,1,2,3] b = [4,5,6,7] c = (a,b) 

i.e., how result ([1,2],[5,6]) c?

i've tried c[:][1:2] result ([4, 5, 6, 7],)

you use comprehension:

tuple(x[1:3] x in c)  

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -