3 ms·
Oops, hit the "reply" button by accident when trying to dismiss a spelling correction on the iPad, and I do not know how to edit, due to my anti-procrastination
by Someone 15y ago
Oops, hit the "reply" button by accident when trying to dismiss a spelling correction on the iPad, and I do not know how to edit, due to my anti-procrastination setting. Intended was to compare:
Foreach item in items
With
Foreach datum in data
I also use itemss for a container of containers:
Foreach items in itemss
Foreach item in items
Of course, if the code is less generic, different names are more appropriate:
Foreach row in matrix
Foreach cell in row
- AncientPC 15y agoFor small scoped loops, I usually just abbreviate to the first letter. I'm not sure how others feel about this, but I think it's perfectly legible: for i in items: i += 1 for r in rows: for c in columns: matrix[r][c] *= 2