You can use a regular expression or plain simple len() 2011/7/1 Ryan Kirk <ryank...@me.com>
> 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 or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor