players=['charles','martina','michael','florence','eli']
print(players[0:3])
print("\n")
players=['charles','martina','michael','florence','eli']
print(players[1:4])
print("\n")
players=['charles','martina','michael','florence','eli']
print(players[:4])
print("\n")
players=['charles','martina','michael','florence','eli']
print(players[2:])
print("\n")
players=['charles','martina','michael','florence','eli']
print(players[-3:])
print("\n")
players=['charles','martina','michael','florence','eli']
print("Here are the first three players on my team:")
for player in players[:3]:
print(player.title())
print("\n")
my_foods=['pizza','falafel','carrot cake']
friend_foods=my_foods[:]
print("My favorite foods are:")
print(my_foods)
print("\nMy friend's favorite foods are:")
print(friend_foods)
print("\n")
my_foods=['pizza','falafel','carrot cake']
friend_foods=my_foods[:]
my_foods.append('cannoli')
friend_foods.append('ice cream')
print("My favorite foods are:")
print(my_foods)
print("\nMy friend's favorite foods are:")
print(friend_foods)
print("\n")
my_foods=['pizza','falafel','carrot cake']
friend_foods = my_foods
my_foods.append('cannoli')
friend_foods.append('ice cream')
print("My favorite foods are:")
print(my_foods)
print("\nMy friend's favorite foods are:")
print(friend_foods)
print("====")
players=['charles','martina','michael','florence','eli']
print("The first three items in the list are:")
print(players[:3])
print("Three items from the middle of the list are:")
print(players[1:4])
print("The last three items in the list are:")
print(players[-3:])
print("====")
my_foods=['pizza','falafel','carrot cake']
friend_foods = my_foods[:]
my_foods.append("new pizza")
friend_foods.append("new fpizza")
print("My favorite pizzas are:")
for value in my_foods:
print(value)
print("My friend's favorite pizzas are:")
for value in friend_foods:
print(value)
print("====")
my_foods=['pizza','falafel','carrot cake']
friend_foods = my_foods
my_foods.append('cannoli')
friend_foods.append('ice cream')
print("My favorite foods are:")
for value in my_foods:
print(value)
print("\nMy friend's favorite foods are:")
for value in friend_foods:
print(value)