Re: [Tutor] transforming an integer to a list of integers

2009-02-03 Thread Kent Johnson
On Tue, Feb 3, 2009 at 10:17 AM, H.G. le Roy wrote: > One step for my solution should be transforming this big integer to a list > of integers. I did: > > import math > > bignr = 12345 > bignrs =[] > The suggestions with strings are fine, but you can simplify your approach as well: > for i in x

Re: [Tutor] transforming an integer to a list of integers

2009-02-03 Thread Andre Engels
On Tue, Feb 3, 2009 at 4:24 PM, Andre Engels wrote: > On Tue, Feb 3, 2009 at 4:17 PM, H.G. le Roy wrote: >> 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?s

Re: [Tutor] transforming an integer to a list of integers

2009-02-03 Thread Andre Engels
On Tue, Feb 3, 2009 at 4:17 PM, H.G. le Roy wrote: > 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

Re: [Tutor] transforming an integer to a list of integers

2009-02-03 Thread Ken Oliver
Not an expert here, but I think I would first change it to a big string of 1000 chars and then pick off the chars one at a time and do int().-Original Message- From: "H.G. le Roy" Sent: Feb 3, 2009 10:17 AM To: tutor@python.org Subject: [Tutor] transforming an integer to

[Tutor] transforming an integer to a list of integers

2009-02-03 Thread H.G. le Roy
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: imp