List Slicing

Run Settings
LanguagePython
Language Version
Run Command
amazon_cart = [ 'notebooks', 'sunglasses', 'toys', 'grapes' ] amazon_cart[0] = 'laptop' new_cart = amazon_cart[:] #this code created a new list new_cart[0] = 'gum' print(new_cart) print(amazon_cart)
Editor Settings
Theme
Key bindings
Full width
Lines