Python: while迴圈 by 儲蓄保險王 · 2022-03-06 Python: while迴圈 total =10 while total < 100: print(total) total = total + 10 執行結果: 10 20 30 40 50 60 70 80 90 相關文章Python: 2D array/list的切片,建立dict的方法:dic = dict(2D list) ; set1 = set(dic) #2D list可以轉為dict, dict的key可以轉為setPython TQC考題902 資料加總, data=file.read().split()Python TQC考題310: 阿姆斯壯數Python: 如何使用 pandas.DataFrame.plot 繪圖? ax=df.plot( subplots=False ) ; plt.subplots_adjust( hspace=1 ) 調整子圖間的間距Tableau如何建立兩個集合,篩選交集的資料?Python WordprocessingML 深入指南:解析、迭代與安全操作 .docx 結構; from docx.oxml.ns import qn ; qn('w:p') ; qn('w:tbl') ; qn('w:sectPr')BenQ B50 4K2K錄影畫質,森森購物才賣3776Python TQC考題908 單字次數計算,with open() as file: for line in file: for w in line.split()Python: 如何進行測試流程的黑名單過濾
0 Python 邏輯運算子: and(&) or(|) xor(^) not ; assert 預期為真的條件式, “錯誤訊息” ; 條件式為真的話,繼續往下跑,否則AssertionError: “錯誤訊息” 2023-02-20
0 Python: 如何從Excel檔的欄位字母(column letter)獲取index? from openpyxl.utils import column_index_from_string, get_column_letter ; 從DataFrame的column name獲取index: pandas.DataFrame.columns .get_loc( “column_name” ) 2025-05-05
0 Python: matplotlib.pyplot ; lines = ax.plot(x, y) ; 如果y是2D的 pandas.DataFrame ; 如何一次加入所有欄標籤當作圖例(legend)的labels? labels= y.columns.tolist() ; ax.legend(lines, labels) 2023-05-21
近期留言