Answers for "numpy get length of list"

0

numpy get length of list

arr = np.array(['aasdfads', 'asfdads', 'fdfsdfaf'])
>>> [len(i) for i in arr]
[8, 7, 8]
Posted by: Guest on January-15-2021

Python Answers by Framework

Browse Popular Code Answers by Language