반응형
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")
반응형
'Python > error debug' 카테고리의 다른 글
IndentationError: unindent does not match any outer indentation level (0) | 2024.08.04 |
---|---|
IndentationError: unexpected indent (0) | 2024.08.04 |
IndentationError: expected an indented block (0) | 2024.08.04 |
SyntaxError: unexpected EOF while parsing (0) | 2024.08.04 |
SyntaxError: expected an indented block (0) | 2024.08.04 |