hw2 <<
Previous Next >> hw3
作業1
import urllib.request
#導入urllib.request
url = "https://nfulist.herokuapp.com/?semester=1091&courseno=0776"
#設target_url = "網址"
cp17 = []
#設cp1b=數列
for line in urllib.request.urlopen(url):
#重複打開target_url的迴圈定義line
cp17.append(int(line.decode('utf-8').rstrip()))
#把line重新編碼加進cp1b(數列) 註:rstrip()刪除字尾符號
print(cp1b)
#印出cp17
hw2 <<
Previous Next >> hw3