title: Convert a string value to variable part
body: <p>I am trying to convert a string input as part of variable.</p>
  <p>Ex :</p>
  <p>lets say input string is A</p>
  <pre><code>Api.setting = Setting.SetA
  </code></pre>
  <p>if input string is 1</p>
  <pre><code>Api.setting = Setting.Set1
  </code></pre>
  <p>I have implemented with all possible cases like</p>
  <pre><code>if input1 == &quot;A&quot;:
      Api.setting = Setting.SetA
  elif input1 == &quot;1&quot;:
      Api.setting = Setting.Set1
  </code></pre>
  <p>etc;</p>
  <p>I am unsure if I have covered all possible cases or not. And also if new cases come, I need to add new elif conditions.</p>
  <p>Is there a better way to do it?</p>