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:50:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545929413.61.0.377250140458.issue35597@roundup.psfhosted.org>
In-reply-to
Content
Please read my answer again.  Your code does not do what you _think_ it does.  It does what I said it does instead.

>>> a = input()
1010
>>> print(a)
1010
>>> print(type(a))
<class 'str'>

The input you're working with is NOT A LIST OF INTEGERS.  It's a string of "0" and "1" CHARACTERS.

And I already told you how to repair that too:

>>> a = list(map(int, a))
>>> a
[1, 0, 1, 0]
>>> type(a)
<class 'list'>
History
Date User Action Args
2018-12-27 16:50:16tim.peterssetrecipients: + tim.peters, paul.moore, scoder, tim.golden, zach.ware, steve.dower, Fady shehata
2018-12-27 16:50:13tim.peterssetmessageid: <1545929413.61.0.377250140458.issue35597@roundup.psfhosted.org>
2018-12-27 16:50:13tim.peterslinkissue35597 messages
2018-12-27 16:50:13tim.peterscreate