I am trying to convert a string input as part of variable.
Ex :
lets say input string is A
Api.setting = Setting.SetA
if input string is 1
Api.setting = Setting.Set1
I have implemented with all possible cases like
if input1 == "A":
Api.setting = Setting.SetA
elif input1 == "1":
Api.setting = Setting.Set1
etc;
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.
Is there a better way to do it?