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

沒有留言:

張貼留言

OPEN DATA AQI 空氣品質監測網 + NODE-RED

OPEN DATA AQI 空氣品質監測網 + NODE-RED  首頁 - 空氣品質監測網  https://airtw.moenv.gov.tw/ https://data.gov.tw/datasets/search?p=1&size=10&s=_score...