Title: "Why am I getting a syntax error example here? What’s wrong?"
Hey everyone,
I’m stuck on this stupid syntax error example in my code and can’t figure out what’s breaking it. Here’s the snippet:
```python
if x = 5:
print("Hello")
```
The error says "invalid syntax" and points at the equals sign. I thought this was how you check equality??
Am I missing something obvious?
Also, I’m kinda new to coding, so if anyone can explain why this is a syntax error example, that’d be awesome.
Thanks in advance!
(Using Python 3 btw)
Hey everyone,
I’m stuck on this stupid syntax error example in my code and can’t figure out what’s breaking it. Here’s the snippet:
```python
if x = 5:
print("Hello")
```
The error says "invalid syntax" and points at the equals sign. I thought this was how you check equality??
Am I missing something obvious?
Also, I’m kinda new to coding, so if anyone can explain why this is a syntax error example, that’d be awesome.
Thanks in advance!
(Using Python 3 btw)
