hi,
i want to create an array element of increment value in a loop.
example:
a=[0,1,2,3,4,5,0,1 ,2,3,4,5,0,1,2, 3,4,5]
output of my code :
a=[0,1,2,3,4,5,0,0 ,0,0,0,0,0,0,0, 0,0,0]
how do i fill in the rest of the array element?help!
thanks-
i want to create an array element of increment value in a loop.
example:
a=[0,1,2,3,4,5,0,1 ,2,3,4,5,0,1,2, 3,4,5]
output of my code :
a=[0,1,2,3,4,5,0,0 ,0,0,0,0,0,0,0, 0,0,0]
how do i fill in the rest of the array element?help!
thanks-
Code:
a=[0 for i in range(18)] for i in range(6): a[i]=i
Comment