On Sep 22, 2015 3:46 PM, "Chris Roberts" <thecjg...@gmail.com> wrote: > > > (How do I make it into an index? ) > Preferably something fairly easy to understand as I am new at this. > > results = 134523 #(Integer) > > Desired: > results = [1, 2, 3, 4, 5, 2, 3] #(INDEX) > > Somehow I see ways to convert index to list to int, but not back again.
I'm not sure what you mean by "index" in this context, but do you just want to convert the integer into a list of its digits? The simple way is to convert it to a string, then convert each character back to an int, and put the results into a list. More efficient way would be to strip the digits off one at a time by dividing modulo 10.
-- https://mail.python.org/mailman/listinfo/python-list