[Tutor] Through a glass, darkly: the datetime module

Richard D. Moores rdmoores at gmail.com
Sun Oct 7 03:10:57 CEST 2012


On Sat, Oct 6, 2012 at 4:29 PM, Dave Angel <d at davea.name> wrote:

> To turn an integer (0-6, or whatever) into a string, just use a tuple of
> the same size:
>
> tran = ("MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY",
> "SATURDAY", "SUNDAY")
> i = 1
> print tran[i]
>
> (prints "TUESDAY")

Why did you choose "tran"?

Dick


More information about the Tutor mailing list