why i

Ben Finney bignose-hates-spam at and-benfinney-does-too.id.au
Tue May 25 02:45:29 EDT 2004


On Tue, 25 May 2004 08:10:51 +1000, mr_vocab wrote:
> i never got this its always in my tutial bookfor i in range(...)

"Index".  i.e., the variable will be the index of an array you want to
iterate over.

The usage of "i" was promulgated by the FORTRAN language, which allowed
only single-letter variable names (and was all upper case, too, so it
was actually I).  The FOR statement was commonly used to iterate over an
array, and I and J were the commonly used index variables for that
purpose.

-- 
 \       "If you write the word 'monkey' a million times, do you start |
  `\                   to think you're Shakespeare?"  -- Steven Wright |
_o__)                                                                  |
Ben Finney <http://bignose.squidly.org/>



More information about the Python-list mailing list