title: What can I do to get rid of the 'int' object is not subscriptable error in my main function def model:
body: <p>I am doing my GCSE this summer and am confused as to why this line of code will not be accepted.<br>
  Any help will be helpful.</p>
  
  <p>Error is coming from line <code>print('First gen \nJuveniles in gen 1',new_gens[0][0],'\nAdults in gen 1',new_gens[0][1],'\nSeniles in gen 1',new_gens[0][2])</code></p>
  
  <p>I am trying to make a first generation of greenflies, however I am struggling to even get them printed and python is saying that the integer is not subscriptable. </p>
  
  <pre><code>def Menu():
      again = True
      while again == True:
          print('\n------------------GreenFly Model------------------\n\n')
          print('MENU\n')
  
          print('Option 1\t Set the Generation 0 values')
          print('Option 2\t Display the Generation 0 values')
          print('Option 3\t Run the model')
          print('Option 4\t Quit')
          print('Select an option from above')
          choice = str(input('What is your option?'))
          if choice == '1':
              Generation_0()
          elif choice == '2':
              Display_Generation_0()
          elif choice == '3':
              model()
          elif choice == '4':    
              quit_model()
              again = False
          else:
              print('invalid option, Try again') 
  
  def Generation_0():
      global gen0
      Juveniles = int(input('How many Juveniles? '))
      Adults = int(input('How many Adults? '))
      Seniles = int(input('How many Sentiles? '))
      BR = int(input('What is your birthrate? ')) 
      J_Survrate = int(input('Juvenile survival rate between 0&amp;1'))
      A_Survrate = int(input('Adult survival rate between 0&amp;1'))
      S_Survrate = int(input('Senile survival rate between 0&amp;1'))
      num_gen=int(input('Birth rate between 5 and 25'))
      gen0 = [[Juveniles,Adults,Seniles], #stores all the information in a 2d array
              [BR],
              [J_Survrate,A_Survrate,S_Survrate],
              [num_gen]]
      gens.append(gen0)
      print(gen0)
      Menu()
  
  
  def Display_Generation_0(): #lists out the 2d array
      print('Generation 0\nJuvenile numbers are ',gen0[0][0], "\nAdult numbers are ",gen0[0][1],'\nSenile numbers are ',gen0[0][2],'\nBirth rate is ',gen0[1][0],'\nJunior survival rate is ',gen0[2][0], '\nAdult survival rate is ',gen0[2][1], '\nSenile survival rate is ',gen0[2][2], '\nNumber of generations is ',gen0[3][0],)    
  
  
  def model():
      new_gens = [(gen0[0][1]*gen0[1][0]),(gen0[0][0]*gen0[2][0]),((gen0[0][1]*gen0[2][1])+(gen0[0][2]*gen0[2][2]))]
      print('First gen \nJuveniles in gen 1',new_gens[0][0],'\nAdults in gen 1',new_gens[0][1],'\nSeniles in gen 1',new_gens[0][2])
  
  #Main
  gens=[]
  Menu()
  </code></pre>