Syntax error


count = 0

while count < 10:
    print count += 1

Hey guys,

The code looks correct to me, however, I get the following error
Syntax Error: invalid syntax

What is wrong with the syntax here?

Thank you!


Print will only work with variables that can be converted to string with the str() function (which happens automatically when you call print).

You need to move your count += 1 onto a separate line.