How can I shorten this condition pattern;
if xconditon == "a text":
Avariable = Yvariable
elif xcondition == "b text":
Bvariable = Yvariable
elif xcondition == "c text":
Cvariable = Yvariable
condition goes on like this, there is a pattern so I am searching for ways to shorten this code.
I'm looking for best way to reduce the code clutter, also improving the performance, looked for Python equivalent C++ auto, thought of using 2D lists but using dictionary seems better.