How to Update Lists : List Assign « List « Python






How to Update Lists

 

aList = [123, 'abc', 4.56, ['inner', 'list'], (7-9j)]
print aList[2]
aList[2] = 'float replacer'
print aList
aList.append("hi, i'm new here")
print aList

   
  








Related examples in the same category

1.How to Create and Assign 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