You are here: Home / Topics / Python program to display the first and last colors from the following list

Python program to display the first and last colors from the following list

Filed under: Python on 2023-09-18 06:57:02

color_list = ["Red","Green","White" ,"Black"]

color_list = ["Red","Green","White" ,"Black"]
print( "%s %s"%(color_list[0],color_list[-1]))     

Output:

Red Black 

About Author:
S
Shyam Dubey     View Profile
If you are good in any field. Just share your knowledge with others.