Hot answers tagged

1

When translating your original code from C to Python, you copied the indentation. That third for loop is not nested inside the second. In C, this doesn't matter because it ignores indentation and will follow the curly braces. In Python, though, the indentation means that the loop is nested, so your code is not as similar as it might appear. In other words, ...


Only top voted, non community-wiki answers of a minimum length are eligible