python ==语法错误

fue*_*ell 1 python operators

我通过风车测试得到以下代码的语法错误.看起来它不喜欢==对我做错了什么的任何想法

counter = 0
while True:
    try:
        # some code goes here

    except:
        counter += 1
        # some code  goes here

        if counter == 3
            counter = 0
Run Code Online (Sandbox Code Playgroud)

yan*_*yan 8

你的if语句后需要一个冒号.

编辑:修复代码的格式.

我也看到你正在使用C风格的注释,Python不支持.Python中的所有注释都以#.

此外,Python通过缩进来dellimits阻塞.确保一致地缩进块.