Python, convert an integer into an index?

paul.hermeneutic at gmail.com paul.hermeneutic at gmail.com
Thu Sep 24 09:45:50 EDT 2015


>> I'm suprised. Why not just:
>>
>> list(str(results))
>>
>> In other words, is there something else the list constructor should do
>> with a string other than convert it to a list?
>>
> The OP wanted the result to be a list of ints, not a list of strings.

[int(x) for x in list(str(results))]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150924/b9a60fbe/attachment.html>


More information about the Python-list mailing list