Hi,

recently I learned about Project Euler (http://projecteuler.net/) and now
I'm trying to work me through. At the moment I'm thinking about
http://projecteuler.net/index.php?section=problems&id=8

One step for my solution should be transforming this big integer to a list
of integers. I did:

import math

bignr = 12345
bignrs =[]

for i in xrange(math.ceil(math.log10(bignr)):
  rem = bignr % 10
  bignrs.append(rem)
  bignr /= 10

However this "feels" a bit complicated, Do you know a better (more simple,
nice etc.) way to do this?

Thanks
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to