[Tutor] Re:Help on Tutor

Scott Widney SWidney@ci.las-vegas.nv.us
Mon Jul 28 13:58:02 2003


> An alternative way of doing this, without as much string 
> manipulation, can
> be to use the "modulo" (remainder) operator.  Anything 
> divided by 100 will
> leave a remainder between 0 and 99.
> 
> ###
> >>> int(time.time()) % 100
> 16
> ###
> 
Oops. Good catch! I tell you, I have a one-track mind. Someone mentioned
string manipulation at the beginning of the thread and I couldn't see past
it. Certainly shows the value of having many eyes looking at both the
problem and the solution. Thanks!