# Why is this a syntax error?

**URL:** <https://forums.digi.com/t/why-is-this-a-syntax-error/22141>\
**Category:** Python\
**Tags:** micropython, python, xbee\
**Created:** [January 19, 2021, 12:14pm UTC](https://forums.digi.com/t/why-is-this-a-syntax-error/22141 "2021-01-19T12:14:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glenn\_Hamblin](https://avatars.discourse-cdn.com/v4/letter/g/7ba0ec/32.png) [@Glenn\_Hamblin](https://forums.digi.com/u/Glenn_Hamblin)\
**Post date:** [January 19, 2021, 12:14pm UTC](https://forums.digi.com/t/why-is-this-a-syntax-error/22141/1 "2021-01-19T12:14:36Z")

</div>

Hi,

I’m a total noob with MicroPython. I’m trying to do something I expect would be easy, but I get a syntax error for .  
Here’s the snippet that fails. It’s actually the second line that generates the error.

if(stdin.buffer.any() \> 34)

```
data = stdin.buffer.readline() 

```

The error is;  
Traceback (most recent call last):  
File “”, line 108  
SyntaxError: invalid syntax

Thanks in advance if you don’t mind helping me out.  
Glenn

---

<div class="post-metadata">

**Author:** ![starfish](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@starfish](https://forums.digi.com/u/starfish)\
**Post date:** [February 15, 2021, 10:47am UTC](https://forums.digi.com/t/why-is-this-a-syntax-error/22141/2 "2021-02-15T10:47:50Z")

</div>

The forum mangled your code but I’ll make a best-effort guess.

Your `if` statement doesn’t look right; it does not end with a colon. Syntactically it should be `if (stdin.buffer.any() &gt; 34):`

Try that, but I also suspect your `if` statement itself won’t work…never seen `any` used like that.
