Defining a List : Introduction « List « Python Tutorial






numList = [2000, 2003, 2005, 2006]
stringList = ["Essential", "Python", "Code"]
mixedList = [1, 2, "three", 4]
subList = ["Python", "Phrasebook", ["Copyright", 2006]]
listList = [numList, stringList, mixedList, subList]








7.1.Introduction
7.1.1.Defining a List
7.1.2.Creation of both homogeneous and heterogeneous lists.
7.1.3.Items of a list are separated by commas and enclosed in square brackets
7.1.4.Nested list
7.1.5.multidimensional arrays