2018年1月8日 星期一

Python: Generate a list and tuple with comma-separated numbers

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
>>> 

沒有留言:

張貼留言

第一次 作業 1219 ,RFID應用(四技日間部),國秀樓302教室, [選,3, 3], 四電三選7

 第一次  作業 1219 ,RFID應用(四技日間部),國秀樓302教室, [選,3, 3], 四電三選7  https://www.mediafire.com 超連結下載 https://www.mediafire.com/file/e297c5zkqaplo7z/RFID%...