title: Python Ternary Operator adding integers
body: <p>I am trying to do a ternary operation in python by adding 1 to an item in an array if money == 100 and adding 1 to another item if it does not. But I keep on getting an invalid syntax error.</p>
  
  <pre><code> bills[2] += 1 if money == 100 else bills[1] += 1
                                               ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Here is the code.</p>
  
  <pre><code>def tickets(people):
  change =0 
  bills = [0,0,0]
  for i,money in enumerate(people):
      if money == 25:
          change += 25
          bills[0] += 1
          str = "This is the %d th person with %d money" % (i,money)
          print(str)
  
      else:
          bills[2] += 1 if money == 100 else bills[1] += 1
          change -= (money -25)
          str = "This is the %d th person with %d money" % (i,money)
          print(str)
          print("change is %d" % change)
  
  if change &lt; 0:
      return "NO"
  else:
      return "YES"
  </code></pre>