I have a list iteration in python defined like this:
for i in range(5):
for j in range(5):
if i != j:
print i , j
So for each element in my defined range [0..5] I want to get each element i, but also all other elements which are not i.
This code does exactly as I expect, but is there a cleaner way of doing this?
5, I wouldn't worry. From a legibility point of view, this is perfectly readable.