diff --git a/Chapter_04/4-11_myPizzas.py b/Chapter_04/4-11_myPizzas.py new file mode 100644 index 0000000..6546c5b --- /dev/null +++ b/Chapter_04/4-11_myPizzas.py @@ -0,0 +1,16 @@ +# Exercise 4-11 My Pizzas +# Learning Objective: Copy a list and add to it making sure it is independant of the original list. + + +favoritePizzas = ['Meat lovers', 'White with Spinach and Feta', 'Pepperoni'] + +friendPizzas = favoritePizzas[:] + +favoritePizzas.append('Chicken Parmesean') + +friendPizzas.append('Hawaiian') + +print(f"My favorite pizzas are: {favoritePizzas}.\n") + +print(f"My friend's favorite pizzas are: {friendPizzas}.\n") +