如何克隆或複製列表? - How to clone or copy a list?

問題:

What are the options to clone or copy a list in Python? 在Python中克隆或複製列表有哪些選項? this

While using new_list = my_list , any modifications to new_list changes my_list everytime. 使用new_list = my_list ,對new_list任何修改new_list每次更改my_list Why is this? 爲何是這樣? spa


解決方案:

參考一: https://stackoom.com/question/Axhy/如何克隆或複製列表
參考二: https://oldbug.net/q/Axhy/How-to-clone-or-copy-a-list
相關文章
相關標籤/搜索