> In Python, the direct translation of this is a for loop. When the > index doesn't matter to me, I tend to write it as: > > for _ in xrange (1,n): > some code > > An alternative way of indicating that you don't care about the loop > index would be > > for dummy in xrange (1,n): > some code
I usually use _ when I know that i18n doesn't matter. dummy is just to long when unpacking sequences: for dummy, email, dummy, dummy in persons: sendmail(email) for _, email, _, _ in persons: sendmail(email) -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list