[issue35597] Bug in Python's compiler
Fady shehata
report at bugs.python.org
Thu Dec 27 11:55:57 EST 2018
Fady shehata <fofash461 at gmail.com> added the comment:
yea yea i understand you and you are right thank you and sorry for this
miss understanding 😊
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Thu, 27 Dec 2018 at 18:50, Tim Peters <report at bugs.python.org> wrote:
>
> Tim Peters <tim at python.org> added the comment:
>
> 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'>
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue35597>
> _______________________________________
>
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35597>
_______________________________________
More information about the Python-bugs-list
mailing list