I have this little piece of code that causes a trouble:
counter = 0
def F(n):
counter += 1 # Problem is in this line
...
Why do I get this error?
P.S.: I've seen similar questions on SO, but none of them solved my issue. PLEASE DO NOT CLOSE THE QUESTION