Re: [Tutor] Limit raw_input to hundredth decimal point

2011-07-02 Thread Ryan Kirk
Thanks all! This helps a lot. On Jul 1, 2011, at 6:13 AM, Steven D'Aprano wrote: > Ryan Kirk wrote: >> Is there a way to limit raw_input to the hundredth decimal point? > > No. raw_input is a tool that does one thing: it collects input from the user. > It doesn't u

[Tutor] Limit raw_input to hundredth decimal point

2011-07-01 Thread Ryan Kirk
Is there a way to limit raw_input to the hundredth decimal point? For example, I'd like to allow the user to enter 5.75 but not 5.756: dollars = raw_input("Please enter a dollar amount: $") Thanks! ___ Tutor maillist - Tutor@python.org To unsubscribe