zip 是 python 很好用但 用的人卻不多的function
寫 python 時我常常用 zip 把兩個 list 合併成一個 dict ..
dict 要查群時 會方便很多
hours = [x for x in range(0,24)]
Counts = [int(0) for x in range(0,24)]
hourUpCounts = dict(zip(hours,Counts))
hourDownCounts = dict(zip(hours,Counts))
hourSpeed = dict(zip(hours,Counts))
2019年1月23日 星期三
訂閱:
張貼留言 (Atom)
Ether.FI 神卡 https://www.ether.fi/@46933474
Ether.FI 真的是神卡 有買US Amazon 或穩定幣的很適合辦一張 我的推薦碼 https://www.ether.fi/@46933474
-
最近常需要更新 embeded 產品的 bootcode 會需要用到 TFTP server . 再 Windows 上可以直接下載免費的 TFTP server 軟體 , 但 MacBook Pro 找不到好用的 不過 MacBook Pro 有自帶 TFTP server ...
-
按鈕(Buttons) 是 GUI 中很常用到的元件 按鈕的建置跟上一篇提到很相識, 但多了一個連動的概念以 PyQT 來說就是Signals and Slot (訊號與槽) 葉就是說當我按了一個 Button ( 發射一個訊號) 要執行哪個動作 (到哪個槽) ...
-
python memory issues blogs http://terrence.logdown.com/posts/700111-python-track-memory-usage https://www.codetw.com/ceplqhk.html http...

沒有留言:
張貼留言