Created
February 27, 2023 07:37
-
-
Save ben-n93/224b921585d75505177cdade3091c287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
# Using slice syntax | |
car_brands = ['Toyota', 'Ford', 'Honda'] | |
car_brands_copy = car_brands[:] | |
# Using the copy module | |
car_brands = ['Toyota', 'Ford', 'Honda'] | |
car_brands_copy = copy.copy(watch_brands) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment