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

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

color_list = [“Yellow”,”Green”,”Red” ,”Black”]

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

Result

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

 

Leave a Comment