<p dir="ltr"><br>
On 12 Jun 2013 10:29, "Νικόλαος Κούρας" <<a href="mailto:support@superhost.gr">support@superhost.gr</a>> wrote:<br>
><br>
> On 12/6/2013 12:07 μμ, F�bio Santos wrote:<br>
>><br>
>> On Wed, Jun 12, 2013 at 9:54 AM, Νικόλαος Κούρας <<a href="mailto:support@superhost.gr">support@superhost.gr</a>> wrote:<br>
>>><br>
>>> but if enumerate yields 0 instead of '==========' then elif '=' not in<br>
>>> year of course fails.<br>
>>><br>
>>> So, i must tell:<br>
>>><br>
>>> for i, month in enumerate(months):<br>
>>>      print('<option value="%s"> %s </option>' % (i, month) )<br>
>>><br>
>>> to somehow return '==========' instead of 0 but don't know how.<br>
>>> --<br>
>>> <a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br>
>><br>
>><br>
>> Well, you could try this:<br>
>><br>
>>> for i, month in enumerate(months):<br>
>>>      if i == 0:<br>
>>>          month = ('=' * 10)<br>
>>>      print('<option value="%s"> %s </option>' % (i, month) )<br>
>><br>
>><br>
>> No?<br>
><br>
><br>
> I'am afraid not Fabio, i just tried byt sumbitting only the year, not name not month<br>
><br>
> after printign the valeus to see what went wrong, the values look like:<br>
><br>
> ========== 0 2010<br>
><br>
> instead of:<br>
><br>
> ========== ==========  2010<br>
><br>
> ========== is the value of the month when its not selected by the user, but even with your suggestions it reurns t0 intead of the equal signs.....<br>
><br>
> -- <br>
> <a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a></p>
<p dir="ltr">Have you tried</p>
<p dir="ltr">i = month = '=' * 10</p>
<p dir="ltr">I had assumed you just wanted those equal signs for the user display.<br>
</p>