How do you name loop variables when the list item is named after something without a plural? For instance (in python): [x for x in sheep]
. x
is not a great name, but sheep have/has no plural that distinguishes it from the singular.
Is there a general best-practice for naming such variables, to emphasise clarity, and avoid confusion?
item
! Kind of obvious, no? Alternatively, keep the singular variable name and rename the collection.[sheep for sheep in sheepCollection]
. – MetaFight May 18 at 16:23