title: Create list from objects in Python
body: <p>I'm having troubles creating a list from the numbers I made using my code. </p>
  
  <pre><code>ListA = [5,1,3,8,4]
  
  LengthB = (len(ListA))
  
  
  obj0 = ListA[0]
  obj1 = ListA[1]
  obj2 = ListA[2]
  obj3 = ListA[3]
  obj4 = ListA[4]
  
  obj01 = int(obj0)
  obj11 = int(obj1)
  obj21 = int(obj2)
  obj31 = int(obj3)
  obj41 = int(obj4)
  
  obj010 = obj01+obj11
  obj110 = obj01+obj11+obj21
  obj210 = obj11+obj21+obj31
  obj310 = obj21+obj31+obj41
  obj410 = obj31+obj41
  
  ListBnum0 = (obj010 / 2)
  ListBnum1 = obj110 / 3
  ListBnum2 = obj210 / 3
  ListBnum3 = obj310/ 3
  ListBnum4 = obj410 / 2
  
  
  print(ListBnum0)
  print(ListBnum1)
  print(ListBnum2)
  print(ListBnum3)
  print(ListBnum4)
  
  FinalForm1 = str(ListBnum0)
  FinalForm2 = str(ListBnum1)
  FinalForm3 = str(ListBnum2)
  FinalForm4 = str(ListBnum3)
  FinalForm5 = str(ListBnum4)
  </code></pre>
  
  <p>Basically this program takes the <code>ListA</code> numbers and computes the average of the one behind the number, the number and number after if applicable. My real question is how can I take either <code>ListBnum(0)</code> to <code>ListBnum(4)</code> and create another list out of the numbers?</p>
  
  <p>Why does this return an error below? </p>
  
  <pre><code>ListB = list[ListBnum0,ListBnum1,ListBnum2,ListBnum3,ListBnum4]
  </code></pre>