title: Apply math to a member of a list in python
body: <p>I am trying to keep track of some numbers in a list, but I am unable to edit members of said list. When I try subtracting from it I am given the error "unsupported operand type(s) for -=: 'list' and 'int'"</p>
  
  <pre><code>with open("prices.txt") as f:
          seatCapacity = []
          for line in f: 
              line = [int(i) for i in line[10:].split()]
              seatCapacity.append(line)
  
  seatCapacity[seat] -= 1
  </code></pre>
  
  <p>seatCapacity[seat] displays a number correctly so I'm not certain what I'm doing wrong.</p>
  
  <p>Edit:
  Some examples of output are</p>
  
  <pre><code>print(seatCapacity)
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>[[150], [120], [200], [80], [120], [80]]
  </code></pre>
  
  <p>and </p>
  
  <pre><code>print(seatCapacity[seat])
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>[150]
  </code></pre>