Python: Generate a list and tuple with comma-separated numbers
Python Basic: Exercise-8 with Solution
Write a Python program to display the first and last colors from the following list.
color_list = ["Red","Green","White" ,"Black"]
Sample Solution:-
color_list = ["Red","Green","White" ,"Black"]
print( "%s %s"%(color_list[0],color_list[-1]))
=========== RESTART: F:/Python_APSC/py-ex-basic-8.py ==========
Red Black
>>>
沒有留言:
張貼留言