I am running this code:
count=0
l=[1,2,3]
For i in l:
print(count+=1)
This line throws a syntax error in line print(count+=1).
If I use like this, it works:
count=0
l=[1,2,3]
For i in l:
count+=1
print(count)
What am I doing wrong here? I'm using Python 3.7