Python/error debug

SyntaxError: invalid syntax

kimble2 2024. 8. 4. 15:44
반응형

Incorrect Use of Keywords

Problematic Code:

if True
    print("This is True")

 

Error Message:

SyntaxError: invalid syntax

 

Solution: In if statements or other conditionals, you need to add a colon (:) after the condition.

if True:
    print("This is True")

 

 

반응형