What are the options to clone or copy a list in Python?
While using new_list = my_list
, any modifications to new_list
changes my_list
everytime.
Why is this?
What are the options to clone or copy a list in Python?
While using new_list = my_list
, any modifications to new_list
changes my_list
everytime.
Why is this?