HW2 <<
Previous Next >> 2-2
2-1
請問該如何取得與上述一乙相同格式的一甲分組數列? 請詳細說明解題步驟後列出一甲的分組數列.
先抓出班級名單再進行亂數分組
import urllib.request # the lib that handles the url stuff
target_url = "https://nfulist.herokuapp.com/?semester=1091&courseno=0762"
cp1a = []
for line in urllib.request.urlopen(target_url):
cp1a.append(line.decode('utf-8'))
#print(line.decode('utf-8'), end = "")
print(cp1a)
import urllib.request # the lib that handles the url stuff
target_url = "https://nfulist.herokuapp.com/?semester=1091&courseno=0762"
cp1a = []
for line in urllib.request.urlopen(target_url):
cp1a.append(line.decode('utf-8').rstrip())
print(cp1a)
HW2 <<
Previous Next >> 2-2