title: What is the most efficient way to a multiple variable in dictionary in python?
body: <p>this my code, i'm looking, is other way to code this in most efficient way?
    i have multiple variables and inserted to the dictionary.
    please feel to suggest and other options like array and etc will do.</p>
  
  <pre><code>def momentEndSpan(span_type,max_combo,length):
      if "simply supported" == span_type:
          q = max_combo
          force = {}
          RA = {"PA" : q*length/2}
          RB = {"PB" : q*length/2}
          RA_moment = {"MA" : 0}
          R_mid_moment = {"Mmid": (q*math.pow(length,2))/8 }
          RB_moment = { "MB" : 0}
          force.update(RA)
          force.update(RB)
          force.update(RA_moment)
          force.update(R_mid_moment)
          force.update(RB_moment)
          return force
      elif "one end continuous" == span_type:
          q = max_combo
          x = (3/8)*length
          force = {}
          RA = {"Phinge" : 3*q*length/8}
          RB = {"Pfixed" : 5*q*length/8}
          RA_moment = {"Mhinge" : 0}
          R_mid_moment = {"Mmid": (q*math.pow(length,2))*(9/128) }
          RB_moment = { "MB" : -1*(q*math.pow(length,2))/8 }
          force.update(RA)
          force.update(RB)
          force.update(RA_moment)
          force.update(R_mid_moment)
          force.update(RB_moment)
          return force        
  </code></pre>
  
  <p>Thank you very much</p>