I have a string in the following format:
s = "['1', '2', '['a', 'b']']"
And I want to convert it to this list, where each element is not a string:
l = [1, 2, ['a', 'b']]
How can I do that if I don't know from the beginning how long each of the final elements of the list will be?