[Tutor] List all possible 10digit number

Dwight Hutto dwightdhutto at gmail.com
Sat Sep 1 08:00:00 CEST 2012


I could comment this better.

We have a function, iterToHighNum, that takes two parameters: increment and
high_num.
increment is how long the list of numbers being added to the old increment
list of ints, to create a shorter int list that maintains the sequential
count, looking for the high number you're trying to reach.

I guess this is a benchmark thing, not sure, so if you comment out(#) the
print 'no match' function in line 7, it will run quicker.

end_point increments as a boolean, to match the high_num. When that
happens, an if occurs, the match is printed, and the function returns to
the instance caller.

Use the other posters suggestions if they are better suited for you,
however, I'd read what those functions do to give a more experienced lesson
in how the 'experts' would code it out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120901/1da282f2/attachment-0001.html>


More information about the Tutor mailing list