Answers for "how to slice a tuple list giving out specifc order elemtn"

0

python slice second element of list of lists

import numpy as np

A = np.array([[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5]])
A[:,:3]

Out[3]: 
array([[1, 2, 3],
       [1, 2, 3],
       [1, 2, 3]])
Posted by: Guest on April-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language