Viewing a response to: @kona/re-deanliu-da-series-learn-python-with-steem-05-20180802t034140836z
若是印出整個dictionary 就會有含 `{}` 你的`hw_list`本身就是一個字典,所以直接印出來就會出現 {}包在字典外圍。 `.format`的用法是將字串中的某一個東西取代為函數中的東西 例如`' 今天是 {} 月 {} 日'.format(5,19)` 就會分別把5, 19填入兩個框框之中: `今天是5月5日` 以你的例子可以寫成: `print(' {} : {} :{} '.format(m, hw_list[m], a))`
author | antonsteemit |
---|---|
permlink | re-kona-re-deanliu-da-series-learn-python-with-steem-05-20180805t124753150z |
category | da-learnpythonwithsteem |
json_metadata | {"community":"busy","app":"busy/2.5.4","format":"markdown","tags":["da-learnpythonwithsteem"],"users":[],"links":[],"image":[]} |
created | 2018-08-05 12:47:54 |
last_update | 2018-08-05 12:47:54 |
depth | 2 |
children | 1 |
last_payout | 2018-08-12 12:47:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 229 |
author_reputation | 7,534,465,964,895 |
root_title | "[DA series - Learn Python with Steem #05] 基本資料結構" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,187,276 |
net_rshares | 0 |
明白,謝謝解答,讓我再試試🙏🙏🙏
author | kona |
---|---|
permlink | re-antonsteemit-re-kona-re-deanliu-da-series-learn-python-with-steem-05-20180805t130246417z |
category | da-learnpythonwithsteem |
json_metadata | {"tags":["da-learnpythonwithsteem"],"app":"steemit/0.1"} |
created | 2018-08-05 13:02:48 |
last_update | 2018-08-05 13:02:48 |
depth | 3 |
children | 0 |
last_payout | 2018-08-12 13:02:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 16 |
author_reputation | 39,758,138,507,499 |
root_title | "[DA series - Learn Python with Steem #05] 基本資料結構" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 67,188,488 |
net_rshares | 0 |