1itemlist = []
2for j in range(len(myarray)):
3 item = myarray[j]
4 itemlist.append(item)
1>>> x = np.array([2,3,1,0])
2>>> x = np.array([2, 3, 1, 0])
3>>> x = np.array([[1,2.0],[0,0],(1+1j,3.)]) # note mix of tuple and lists,
4 and types
5>>> x = np.array([[ 1.+0.j, 2.+0.j], [ 0.+0.j, 0.+0.j], [ 1.+1.j, 3.+0.j]])
6
1array = ["1st", "2nd", "3rd"]
2#prints: ['1st', '2nd', '3rd']
3array.append("4th")
4#prints: ['1st', '2nd', '3rd', '4th']
1array = [1,2,3,4,5]
2print(array,array[0],array[1],array[2],array[3],array[4]
3
4#Output#
5#[1,2,3,4,5] 1 2 3 4 5
1#use numpy
2import numpy #if you don't have it do pip install numpy
3array = numpy.array(["Ford", "Volvo", "BMW"] )