title: Invalid syntax error in Python
body: <p>I'm starting Comp Sci courses in Uni this coming fall (starting with zero programming knowledge), so I'm just starting to play around programming. I'm following a book and tried copy-pasting some code - but it doesn't work. Here's what I tried:</p>
  
  <pre><code>&gt;&gt;&gt; def function(x):
      return x+2
  function(2)
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>The word "function" was highlighted. I'm confused because the very same example is used in the book and it appears to work but then I get that error on my end. What's going on here?</p>