title: Python post increment variable in function call
body: <p>Premise: I am trying to make a bunch of buttons in Tkinter and put them in a grid layout one after the other. I don't want to hard code each grid value that way I can add more buttons later with ease.</p>
  <p>My first thought was to:</p>
  <pre><code>Button(root, text = &quot;example&quot;, command = self.example_action).grid(row = count++)
  </code></pre>
  <p>But this did not work, I did some searching and found that python does not have a pre or post increment operator (<a href="https://stackoverflow.com/questions/1485841/behaviour-of-increment-and-decrement-operators-in-python">Behaviour of increment and decrement operators in Python</a>). So my next thought was to:</p>
  <pre><code>Button(root, text = &quot;example&quot;, command = self.example_action).grid(row = count = count + 1)
  </code></pre>
  <p>This gives: SyntaxError: invalid syntax</p>
  <p>So other than splitting my code onto two lines (use the variable then update it on the next line) is there a good way to do this all on one line to make my code more beautiful?</p>