本文實例講述了python更新列表的方法。分享給大家供大家參考。具體如下:
aList = [123, 'abc', 4.56, ['inner', 'list'], (7-9j)]print aList[2]aList[2] = 'float replacer'print aListaList.append("hi, i'm new here")print aList運行結果如下:
4.56[123, 'abc', 'float replacer', ['inner', 'list'], (7-9j)][123, 'abc', 'float replacer', ['inner', 'list'], (7-9j), "hi, i'm new here"]
希望本文所述對大家的Python程序設計有所幫助。
新聞熱點
疑難解答
圖片精選