M
manstey
in for loops like the following:
word='abcade'
for letter in word:
print letter
Is it possible to get the position of letter for any iteration through
the loop?
so for examlpe letter=='a', and I want to know if it is the first or
second 'a' in 'abcade'.
can i do this by looking at a property of letter?
word='abcade'
for letter in word:
print letter
Is it possible to get the position of letter for any iteration through
the loop?
so for examlpe letter=='a', and I want to know if it is the first or
second 'a' in 'abcade'.
can i do this by looking at a property of letter?