How to write this simultaneous for loop in python?
Java syntax:
for (int l=0; l<n; l++) {
for(int x=0, y=x+l; x<n && y<n; x++, y++) {
}
}
I tried this in Python 3.x:
for x, y in zip(range(n), range(x+l,n))
but I got an error local variable x referenced before assignment.