![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
碼農傑少
程序人生,承續人生
展开
-
Python list
list.append( x ) list = ['willy','chang','FJU','Handsome','code','PC','iphone'] list.append('genius') list # ['willy', 'chang', 'FJU', 'Handsome', 'code', 'PC', 'iphone', 'genius'] del list[] del lis...原创 2019-07-13 22:49:23 · 74 阅读 · 0 评论 -
Python Class & Inheritance
class class myclass: i = 12345 def f(self): return 'willy is handsome' #將 myclass 實例化 x = myclass() #訪問 class 裡的屬性 & 方法 print(x.i) print(x.f()) >>> 12345 >>> w...原创 2019-07-13 22:53:03 · 228 阅读 · 0 评论 -
Calculate GPA using Python
import pandas as pd excel_path = 'GPA.xlsx' d = pd.read_excel(excel_path, sheetname=None) D:\anacorda\lib\site-packages\pandas\io\excel.py:329: FutureWarning: The `sheetname` keyword is deprecated, u...原创 2019-07-13 22:55:32 · 578 阅读 · 0 评论 -
Python 流程控制
補充額外流程控制語法 range 函數 class range( stop ) class range( start , stop [ , step ] ) >>> list(range(10)) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> list(range(1, 11)) [1, 2, 3, 4, 5, 6, 7, 8, 9,...原创 2019-07-13 22:57:15 · 137 阅读 · 0 评论