when read my code again, i discover this error i fixed before
but forget to do for another branch of if statement
now fixed
On Saturday, May 28, 2016 at 6:19:23 PM UTC+8, meInvent bbird wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item,
thanks, i discover that i misunderstand i and item,
they should be swapped
On Saturday, May 28, 2016 at 6:19:23 PM UTC+8, meInvent bbird wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item, i in enumerate(aa)
> if item == findit:
> p
On Sat, 28 May 2016 08:19 pm, jobmatt...@gmail.com wrote:
> for item, i in enumerate(aa)
> print item
Wrong way around. It should be:
for i, item in enumerate(aa):
print item
For example:
py> for i, item in enumerate(aa):
... print i, item
...
0 c
1 h
2 e
3 e
4 s
5 e
> this writing
jobmatt...@gmail.com wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item, i in enumerate(aa)
> if item == findit:
> print item
>
> this only print the first value, means it only print once then not print
> again,
Assuming
aa = ["fo
On Saturday, 28 May 2016 20:19:23 UTC+10, meInvent bbird wrote:
> for item, i in enumerate(aa)
> print item
>
> this writing, it can print all values
>
> for item, i in enumerate(aa)
> if item == findit:
> print item
>
> this only print the first value, means it only print once then not
for item, i in enumerate(aa)
print item
this writing, it can print all values
for item, i in enumerate(aa)
if item == findit:
print item
this only print the first value, means it only print once then not print again,
where is wrong?
--
https://mail.python.org/mailman/listinfo/python-l