Sorry if this is a really easy question, but I've been going through control flows in the python documentation and something confuses me that it doesn't address.
a = ['Mary', 'had', 'a', 'little', 'lamb']
for i in range(len(a)):
print i, a[i]
When I type that in, it prints the result;
0 Mary
1 had
2 a
3 little
4 lamb
Something also odd was that when I typed "a", I get 'lamb'.
What my question here is that 'i' was never defined here. When I try another letter, or assign 'i' as a variable, I just get an error. What exactly is this and is there anything else like that I should know?