Creating an Array: Difference between revisions

Content added Content deleted
(Cleaner names, separate example for list with multiple types of objects)
(List with multiple type of objects)
Line 347: Line 347:
numbers = [1, 2, 3, 4, 5]
numbers = [1, 2, 3, 4, 5]
zeros = [0] * 10
zeros = [0] * 10

You can put anything into a list, including other lists:
anything = [1, 'foo', 2.57, None, zeros]


==[[Toka]]==
==[[Toka]]==