Viewing a response to: @deanliu/da-series-learn-python-with-steem-05
 Dictionary 不懂使用.format(key,value),所以多了{ },怎麼辦?
author | kona |
---|---|
permlink | re-deanliu-da-series-learn-python-with-steem-05-20180802t034140836z |
category | da-learnpythonwithsteem |
json_metadata | {"tags":["da-learnpythonwithsteem"],"image":["https://cdn.steemitimages.com/DQmXudTPf3vC8mtofdVbEdtP4pUAWXMgwT7rB7WmCAA8iHC/hw5.png"],"app":"steemit/0.1"} |
created | 2018-08-02 03:41:42 |
last_update | 2018-08-02 03:41:42 |
depth | 1 |
children | 5 |
last_payout | 2018-08-09 03:41:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.066 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 145 |
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 | 66,831,307 |
net_rshares | 45,480,515,568 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
deanliu | 0 | 38,217,473,535 | 2.5% | ||
antonsteemit | 0 | 7,263,042,033 | 51% |
若是印出整個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 |
@antonsteemit ... Posted using [Partiko Android](https://play.google.com/store/apps/details?id=io.partiko.android)
author | deanliu |
---|---|
permlink | deanliu-re-kona-re-deanliu-da-series-learn-python-with-steem-05-20180802t035929365z |
category | da-learnpythonwithsteem |
json_metadata | {"app":"partiko"} |
created | 2018-08-02 03:59:30 |
last_update | 2018-08-02 03:59:30 |
depth | 2 |
children | 2 |
last_payout | 2018-08-09 03:59:30 |
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 | 116 |
author_reputation | 3,091,849,028,440,377 |
root_title | "[DA series - Learn Python with Steem #05] 基本資料結構" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 66,832,836 |
net_rshares | 0 |
你這個呼叫外援的操作真的666666🤦♀️
author | nostalgic1212 |
---|---|
permlink | re-deanliu-deanliu-re-kona-re-deanliu-da-series-learn-python-with-steem-05-20180802t042253954z |
category | da-learnpythonwithsteem |
json_metadata | {"tags":["da-learnpythonwithsteem"],"app":"steemit/0.1"} |
created | 2018-08-02 04:22:54 |
last_update | 2018-08-02 04:22:54 |
depth | 3 |
children | 1 |
last_payout | 2018-08-09 04:22: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 | 22 |
author_reputation | 1,485,144,864,967,000 |
root_title | "[DA series - Learn Python with Steem #05] 基本資料結構" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 66,834,671 |
net_rshares | 0 |
他不是外援,是老師,我只是討論課綱的跟開教室的人 LOL
author | deanliu |
---|---|
permlink | re-nostalgic1212-re-deanliu-deanliu-re-kona-re-deanliu-da-series-learn-python-with-steem-05-20180802t141044248z |
category | da-learnpythonwithsteem |
json_metadata | {"tags":["da-learnpythonwithsteem"],"app":"steemit/0.1"} |
created | 2018-08-02 14:10:45 |
last_update | 2018-08-02 14:10:45 |
depth | 4 |
children | 0 |
last_payout | 2018-08-09 14:10:45 |
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 | 28 |
author_reputation | 3,091,849,028,440,377 |
root_title | "[DA series - Learn Python with Steem #05] 基本資料結構" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 66,882,061 |
net_rshares | 0 |