4
Answers

why only first character in array?

Hi

this code puts only the first character in the third element of the array. How come and how to solve this?

Thanks. V.

import numpy as np
arr = np.array(["","",""])
arr[2]="abcde"
print(arr[2]) # show only 'a'
 

Answers (4)