How to Create and Assign Lists : List Assign « List « Python






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')

   
  








Related examples in the same category

1.How to Update Lists
2.Assign list to a list itemAssign list to a list item
3.List: assign by indexList: assign by index
4.List: assign by sliceList: assign by slice