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

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -