Viewing a response to: @xeroc/re-discombobulated-re-xeroc-upvote-bot-in-less-than-10-lines-of-code-20160810t123419152z
Just [tested this more](https://repl.it/languages/python3) and found out what the error was: If you include the single quotes around the array, both statements return True stringList = '["list","of","strings"]' print("list" in stringList) True print ("li" in stringList) True But if you remove the single quotes around the array, it functions as intended: stringList = ["list","of","strings"] print("list" in stringList) True print ("li" in stringList) False Hope this helps!
author | discombobulated |
---|---|
permlink | re-xeroc-re-discombobulated-re-xeroc-upvote-bot-in-less-than-10-lines-of-code-20160810t154102727z |
category | steem |
json_metadata | {"tags":["steem"],"links":["https://repl.it/languages/python3"]} |
created | 2016-08-10 15:41:03 |
last_update | 2016-08-10 15:41:03 |
depth | 3 |
children | 1 |
last_payout | 2016-08-20 18:43:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.033 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 520 |
author_reputation | 13,090,894,039,053 |
root_title | "Upvote bot in less than 10 lines of code" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 726,527 |
net_rshares | 66,969,783,339 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
discombobulated | 0 | 66,969,783,339 | 100% | ||
mex-power | 0 | 0 | 100% |
In the first case, the `stringList` is actually a simple string and is not interpreted as an array. that's why the test returns true in both cases.
author | xeroc |
---|---|
permlink | re-discombobulated-re-xeroc-re-discombobulated-re-xeroc-upvote-bot-in-less-than-10-lines-of-code-20160811t065811793z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-08-11 06:58:12 |
last_update | 2016-08-11 06:58:12 |
depth | 4 |
children | 0 |
last_payout | 2016-08-20 18:43:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 1.070 HBD |
curator_payout_value | 0.007 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 147 |
author_reputation | 118,819,064,085,695 |
root_title | "Upvote bot in less than 10 lines of code" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 741,182 |
net_rshares | 1,509,500,188,688 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
anonymous | 0 | 1,442,524,428,526 | 100% | ||
discombobulated | 0 | 66,975,760,162 | 100% | ||
donneker | 0 | 0 | 100% | ||
normaluser | 0 | 0 | 100% | ||
idealsceneprod | 0 | 0 | 100% | ||
jackeown | 0 | 0 | 100% |