Update - used chat GPT and it came up w this. import ast thing a = ast.literal eval(thing a) Then I use things like int() when evaluating params within, like, int(BestCombo[2]) to make sure the types check out.