Mega Code Archive

 
Categories / Python / List
 

How to Create and Assign Lists

aList = [123, 'abc', 4.56, ['inner', 'list'], 7-9j] anotherList = [None, 'something to see here'] print aList print anotherList aListThatStartedEmpty = [] print aListThatStartedEmpty print list('foo')