+ 3
About i
What is i in , for i in range(5): ??? actually I tried ever letters(small and big) and they worked the same.. what is it's purpose??
6 Respostas
+ 15
No purpose, it's just the variable's name. You can rename it to anything....
+ 4
i is usually used standing for index and/or iterator... you could also encountered c for count, n as it's relatively common in mathematical context, and any other semantically appropriate to the context ^^
+ 1
i mean index (at least I use i as that meaning)
- 1
Like others said it's a variable's name used as an iterator/index in bucles like For, Do.. While or While.
You can rename it to any valid name you want.
Other common names used are c, j, k, n, x, y, z.