This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Fady shehata, paul.moore, scoder, steve.dower, tim.golden, tim.peters, zach.ware
Date 2018-12-27.16:34:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545928446.82.0.206742839175.issue35597@roundup.psfhosted.org>
In-reply-to
Content
`input()` returns a string, not a list.  For input '1010' you're effectively computing this:

>>> int('1' * 8) + int('1' * 2) # = 11111111 + 11
11111122

which is the correct answer.  If you want your input to be a list of integers instead of a string, try, e.g.,

a = input("please enter a binary integer ")
a = list(map(int, a))
History
Date User Action Args
2018-12-27 16:34:43scodersetrecipients: + scoder
2018-12-27 16:34:11tim.peterssetrecipients: + tim.peters, paul.moore, tim.golden, zach.ware, steve.dower, Fady shehata
2018-12-27 16:34:06tim.peterssetmessageid: <1545928446.82.0.206742839175.issue35597@roundup.psfhosted.org>
2018-12-27 16:34:06tim.peterslinkissue35597 messages
2018-12-27 16:34:06tim.peterscreate