[b]"Getting a syntax error in Python—what am I missing?"[/b] or [b]"Why am I seeing a syntax error in Python when

22 Replies, 1858 Views

Lol, classic mistake! The colon is *everything* in Python. No colon, no party.

Your line should be:
```python
if x == 5:
print("Hello")
```

If you're using VS Code, the linter usually catches syntax error python stuff like this right away. Maybe enable PyLint if you haven’t already?

Messages In This Thread



Users browsing this thread: 1 Guest(s)