Computer Science, asked by rushirahul11hum, 7 months ago

2. Write Python statements to display the first and last colours from the
following list:
List1 = ('violet", "indigo", "blue", "green", "yellow", "orange", "red"]​

Answers

Answered by yamanjaikumar
5

Explanation:

first color:

print (List1[0])

last color:

print (List1[-1])

in python it's very easy to print the first and last value of a list because the first value can be easily accessed using the index number 0 and the last value can be accessed using the index number -1.

hope it helps. please mark as the brainliest.

Similar questions