create account

RE: [DA series - Learn Python with Steem #05] 基本資料結構 by antonsteemit

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @kona/re-deanliu-da-series-learn-python-with-steem-05-20180802t034140836z

· @antonsteemit ·
若是印出整個dictionary 就會有含 `{}`
你的`hw_list`本身就是一個字典,所以直接印出來就會出現 {}包在字典外圍。

`.format`的用法是將字串中的某一個東西取代為函數中的東西
例如`' 今天是 {} 月 {} 日'.format(5,19)`
就會分別把5, 19填入兩個框框之中: `今天是5月5日`
以你的例子可以寫成:
`print(' {} : {} :{} '.format(m, hw_list[m], a))`

properties (22)
authorantonsteemit
permlinkre-kona-re-deanliu-da-series-learn-python-with-steem-05-20180805t124753150z
categoryda-learnpythonwithsteem
json_metadata{"community":"busy","app":"busy/2.5.4","format":"markdown","tags":["da-learnpythonwithsteem"],"users":[],"links":[],"image":[]}
created2018-08-05 12:47:54
last_update2018-08-05 12:47:54
depth2
children1
last_payout2018-08-12 12:47:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length229
author_reputation7,534,465,964,895
root_title"[DA series - Learn Python with Steem #05] 基本資料結構"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id67,187,276
net_rshares0
@kona ·
明白,謝謝解答,讓我再試試🙏🙏🙏
properties (22)
authorkona
permlinkre-antonsteemit-re-kona-re-deanliu-da-series-learn-python-with-steem-05-20180805t130246417z
categoryda-learnpythonwithsteem
json_metadata{"tags":["da-learnpythonwithsteem"],"app":"steemit/0.1"}
created2018-08-05 13:02:48
last_update2018-08-05 13:02:48
depth3
children0
last_payout2018-08-12 13:02:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation39,758,138,507,499
root_title"[DA series - Learn Python with Steem #05] 基本資料結構"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id67,188,488
net_rshares0