JuHui wrote:
> >>> a='String'
> >>> for x in a:
> ...     print x
> ...
> S
> t
> r
> i
> n
> g
> >>>
>
> can I get the index number  of a in the upon loop within for x in a
> loop?

for x, y in enumerate(a)
    print x, y

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to