title: How do I format variables in Python
body: <p>I'm currently having a problem in python, what I am trying to do is go through 6 arrays checking if there is a negative number or not and then adding one to the corresponding variable.</p>
  
  <p>I've tried various things to fix this however there is no real documentation that I can find online that will help me</p>
  
  <pre><code>BusA = ["-1","1","-1","1"]
  BusB = ["-1","1","-1","1"]
  BusC = ["-1","1","-1","1"]
  BusD = ["-1","1","-1","1"]
  BusE = ["-1","1","-1","1"]
  BusF = ["-1","1","-1","1"]
  
  Buses = "ABCDEF"
  
  BusALate, BusBLate, BusCLate, BusDLate, BusELate, BusFLate = 0, 0, 0, 0, 0, 0
  
  for c in Buses:
    Array = eval("Bus" + str(c))
    for i in Array:
      if(int(i) &lt; 0):
        eval("Bus"+c+"Late") += 1
  
  print(BusALate, BusBLate, BusCLate, BusDLate, BusELate, BusFLate)
  </code></pre>
  
  <p>If possible I just need a way to format the variable in the if so that it can progressively go through changing it to BusALate, BusBLate etc... and adding when it has found the negative number.</p>