Using ctime to use the last two digits of time?

Brandon br272 at msn.com
Mon Jun 16 11:51:25 EDT 2003


In reference to the Exercise on the bottom of this page;

http://www.honors.montana.edu/~jjc/easytut/easytut/node14.html#SECTION001410000000000000000

"use the last two digits of time at that moment to be the 'random'
number. "

Now, I'm assuming that you need to use ctime to do this - but I have
absolutely no idea how to modify the ctime statement in order for it
to produce the last two digits (the seconds, respectively).

I've searched the newsgroups and Python.org with no success, so if
anyone could point me in the right direction - I'd appreciate it. I'll
keep searching in the meanwhile.

I've noticed that some sites seem to say that ctime(seconds) would be
the right thing to do, but that never seems to work.

Thanks!

Brandon




More information about the Python-list mailing list