removing the ' from list elements
Steve Holden
sholden at bellatlantic.net
Wed Mar 8 10:17:54 EST 2000
Aaarrrggghhh!!! Just goes to show, the wrong answer in less time
ain't worth a damn. Thanks for pointing out the error.
regards
Steve
smst wrote:
>
> In article <38C662F0.1C9FAC88 at bellatlantic.net>, Steve Holden
> <sholden at bellatlantic.net> wrote:
> >
> >mths = {'01': 'Jan', '02': 'Feb', ... , '12': 'Dec'} # As
> initialisation, once
> > > if mo == 'Jan':
> > > m = '01'
> [etc]
>
> >try:
> > m = mths[mo]
> >except KeyError:
> > m = None
>
> Steve,
>
> Close, but you got the dictionary backwards! It should have
> been:
> mths = {'Jan': '01', 'Feb': '02', ... , 'Dec': '12'}
>
> Sorry to be picky, but that could have caused a confusing
> error...
>
> Cheers,
> Steve Tregidgo
> http://www.businesscollaborator.com
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
--
"If computing ever stops being fun, I'll stop doing it"
More information about the Python-list
mailing list