Python invalid syntax

时间:2015-07-31 19:49:27

标签: python-2.7 python-3.x

I am debugging a developers a code and am somewhat new to python. I am stuck on the following line of code

 if a >= b + c and \


            not d :


    d = True

I receive an invalid syntax error on the first/second line of code. Can you guys please help?

1 个答案:

答案 0 :(得分:0)

Try this

if a >= b + c and not d :
    d = True

Two things: 1) indentations and linebreaks are important in python. You should check the language syntax. 2) Check the style guide for python.