Python 数组列表


Python 数组列表

# Following defines an empty list.
number = []
i = 0

while i < 10:
   # Appending elements in the list
   number.append(i + 100)
   i = i + 1

i = 0
while i < 10:
   # Accessing elements from the list
   print "number[", i,  "] = ", number[ i ]
   i = i + 1