title: How to use a variable from def
body: <p>Example</p>
  
  <pre><code>    G1 = 500
      G2 = 400
      avg1 = 25
      avg2 = 20
  
      def produce(x):
          production_time = Gx /avgx
          return production_time
  
      print (produce(1))
      #out: 20
  </code></pre>
  
  <p>What I want to do is combine the G and the x so that I can use my variable G1 on top.</p>