Task <<
Previous Next >> github page
hwpages
cad2021 2b
解決方法:
# 將資料存入 gist, 取其 url
url = "https://gist.githubusercontent.com/mdecourse/b11a88a98655d41055c47f08fe94788f/raw/8a27e6885ee1a5074bcf864d741679afeac796c4/2b_w2_stud_list.txt"
# 利用 open() 開啟 url 後, 以 readlines() 讀取後可納入數列
data = open(url).readlines()
# 檢查資料筆數, 第一筆為 title
#print(data)
#print(len(data))
data = data[1:]
#print(data)
for i in range(len(data)):
num_github = data[i]
num = num_github.split("\t")[0]
account = num_github.split("\t")[1]
if account == "":
account = num
print("<a href='https://" + str(account) + ".github.io/cad2021_hw'>"+ str(num) + "</a>")
cad2b
github account
40723126
40723135
40723217
40932331
40823114
40823115
40823117
40823119
40823122
40823127
40823146
40823148
40823215
40871106
40923201
40923203
40923204
40923205
40923206
40923207
40923208
40923209
40923210
40923211
40923212
40923213
40923214
40923216
40923217
40923218
40923219
40923220
40923221
40923223
40923224
40923225
40923226
40923227
40923228
40923229
40923230
40923231
40923232
40923233
40923234
40923235
40923236
40923237
40923238
40923239
40923240
40923241
40923242
40923243
40923244
40923245
40923246
40923247
40923248
40923249
40923250
40923251
40923252
40923253
40971220
40971227
<completed in 331.00 ms>
Task <<
Previous Next >> github page