[Tutor] Converting month names to abbreviated form
Gus Tabares
gustabares at verizon.net
Sun Jul 25 05:32:08 CEST 2004
Ah, yes. So foolish of me. Thank you...
Gus
-----Original Message-----
From: Tim Peters [mailto:tim.peters at gmail.com]
Sent: Saturday, July 24, 2004 11:10 PM
To: Gus Tabares
Cc: tutor at python.org
Subject: Re: [Tutor] Converting month names to abbreviated form
[Gus Tabares]
> Are there any known routines for converting month names to their
> abbreviated form (i.e., December->Dec) ?
If you're thinking about American month names, the abbreviation of a
month name is just its first 3 letters.
>>> 'December'[:3]
'Dec'
>>> 'January'[:3]
'Jan'
>>>
etc.
More information about the Tutor
mailing list