title: How can I group a block of code in Python, similar to function, but without the need to define the parameters?
body: <p>How can I group a block of code in Python, similar to a function but without the need to define the parameters?</p>
  <p>For example, the block is like this:</p>
  <pre class="lang-cpp prettyprint-override"><code>code_block() {
      c = a + b
  }
  </code></pre>
  <p>I want to use it in code like this:</p>
  <pre><code>a = 2
  b = 3
  code_block()
  print(c)
  </code></pre>