0
What is the difference between a array and a list how are they written
arrays are faster for math but can they contain var is ("maybe", "fun", "better") and so on do you use () or []
9 Respostas
+ 1
The array is in fact a list where every item has an index.
var a=new Array(); //this is one way to declare an Array
var b=[];//this is another way to declare an array
if you want to fill an array, you specify the index first:
b[0]=1;
b[1]=2;
b[2]=3;//and so on..
Rememb that the index count starts at 0
0
not working, I need to write an array with words and than loop it. I have tried from array import array and went on. the result was that it could not be scripted.
0
from array import array
my array = [1, 'Sunday', 'Monday' etc....]
print (1)
..... now I need to loop it
0
so, you want to print the content with a loop
0
yes Sir
0
i'll send you a code with comments
0
ty