207k views
5 votes
Initialize the tuple team_names with the strings 'Rockets', 'Raptors', 'Warriors', and 'Celtics' (The top-4 2018 NBA teams at the end of the regular season in order). Sample output for the given program:

1 Answer

0 votes

Answer:

#Initialise a tuple

team_names = ('Rockets','Raptors','Warriors','Celtics')

print(team_names[0])

print(team_names[1])

print(team_names[2])

print(team_names[3])

Step-by-step explanation:

The Python code illustrates or printed out the tuple team names at the end of a season.

The code displayed is a function that will display these teams as an output from the program.

User Dylants
by
5.0k points