From 5410aa95a6318bf2da6f1f334ee7346a47c05810 Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Tue, 21 Jan 2025 14:31:30 -0500 Subject: [PATCH] Completed 4-11 My Pizzas --- Chapter_04/4-11_myPizzas.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Chapter_04/4-11_myPizzas.py 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") +