A certainl part of an if() structure never gets executed.

Fábio Santos fabiosantosart at gmail.com
Wed Jun 12 07:49:02 EDT 2013


On 12 Jun 2013 12:08, "Νικόλαος Κούρας" <support at superhost.gr> wrote:
>
> Oh my God!
>
> i just need to do this:
>
>
> for i, month in enumerate( months ):
>         print('<option value="%s"> %s </option>' % (month, month) )

Usually what goes in <option value="..."> is an ID of something. You should
keep using (i, month) and then do months[id] to get the month string.

Also, tuples aren't traditionally used for this. Normally you'd use a list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130612/3a2cd6b8/attachment.html>


More information about the Python-list mailing list