Completed 4-11 My Pizzas
This commit is contained in:
parent
57270f4a06
commit
5410aa95a6
16
Chapter_04/4-11_myPizzas.py
Normal file
16
Chapter_04/4-11_myPizzas.py
Normal file
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user