[Tutor] now = ctime()[11:20]

Richard D. Moores rdmoores at gmail.com
Sat Jul 17 12:59:34 CEST 2010

On Sat, Jul 17, 2010 at 00:03, Alan Gauld <alan.gauld at btinternet.com> wrote:
> "Richard D. Moores" <rdmoores at gmail.com> wrote
>> but then I began to wonder how to create an "alias" for
>> "ctime()[11:20]" so I wouldn't have to keep typing or pasting it.
>> "now" would be fine. But how to get it to execute ctime()?
> Create a function?
> def myNow():
>    return ctime()[11:20]

Yeah! Why didn't I think of that?

> Or am I missing something?

Only that I'm slower than you thought I was. :)

Thanks, Alan.


More information about the Tutor mailing list