A certainl part of an if() structure never gets executed.
Fábio Santos
fabiosantosart at gmail.com
Wed Jun 12 05:07:39 EDT 2013
On Wed, Jun 12, 2013 at 9:54 AM, Νικόλαος Κούρας <support at superhost.gr> wrote:
> but if enumerate yields 0 instead of '==========' then elif '=' not in
> year of course fails.
>
> So, i must tell:
>
> for i, month in enumerate(months):
> print('<option value="%s"> %s </option>' % (i, month) )
>
> to somehow return '==========' instead of 0 but don't know how.
> --
> http://mail.python.org/mailman/listinfo/python-list
Well, you could try this:
> for i, month in enumerate(months):
> if i == 0:
> month = ('=' * 10)
> print('<option value="%s"> %s </option>' % (i, month) )
No?
--
Fábio Santos
More information about the Python-list
mailing list