40923250 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • First
  • Hw1
    • PCH18
      • Laptop and Notebook Component Replacement
      • Troubleshooting Hard Drives
    • PCH19
      • Overview
      • AC Power
      • Proper Disposal Procedures
      • Security
  • HW2
    • 2-1 取得一甲分組數列
    • 2-2 是否有人加退選
    • 2-3 產生W3網頁html
  • Hw3
    • 14.移除重複項
    • 15.倒序
    • 16.密碼生成器
  • 學習日記
    • git clone
    • 刪除submodule
    • ORError
    • ssh keygen
  • python
    • Variables 變數
HW2 << Previous Next >> 2-2 是否有人加退選

2-1 取得一甲分組數列

https://www.kaggle.com/xiefanjun/w13-ex1-py

#導入urllib.request
import urllib.request
#目標url
url = "https://nfulist.herokuapp.com/?
semester=1091&courseno=0776"
#設cp1a為空括弧
cp1a = []
#打開url,並用.rstrip取消/n
for line in urllib.request.urlopen(url):
    cp1a.append(int(line.decode('utf-8').rstrip()))
#列出cp1a內容
print(cp1a)
#列出共幾筆
print("共" + str(len(cp1a)) + "筆")


HW2 << Previous Next >> 2-2 是否有人加退選

Copyright © All rights reserved | This template is made with by Colorlib