I am learning Python on my own. I am using Python Crash Course by Eric Matthes. Chapter 4: Looping through a Slice -
How do I get the output that the book says that I should expect?
#my list
players = ['charles', 'martina', 'michael', 'florence', 'eli']
#my instruction is to print out the first three players names of the team using a for loop. Book lays out the format like this;
print("Here are the first three players on my team:")
for player in players[:3]:
print(player.title())#my output should beOutput:Here are the first three players on my team:
Charles
Martina
Michael#I am using Python 3.8.1 Shell and I am unable to figure out how to combine both print statements to read as the output. When I type the first print statement and hit enter, it prints before I can enter the for loop information. How do I get the output that the book says that I should expect?
