[Tutor] Problem with while loop

Michael Connors connorsml at gmail.com
Fri Sep 7 14:40:24 CEST 2007


You could use string formatting to output all pin numbers as 4 character
strings.

http://docs.python.org/lib/typesseq-strings.html

On 07/09/2007, matte <mailinglistmatt at gmail.com> wrote:
>
> Perfect...
>
> Thanks very much for your help...
>
> On 9/7/07, Michael Connors <connorsml at gmail.com> wrote:
> >
> > I think it will work if you cast your input to an int:
> > howmany = int(raw_input( "How many: " ))
>
>
> Now I just need to figure out how to only get 4 digit pin numbers :)
>
> -m
>



-- 
Michael Connors
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070907/3da1b1bc/attachment.htm 


More information about the Tutor mailing list