Okay, I have this string
tc=\'(107, 189)\'
and I need it to be a tuple, so I can call each number one at a time.
print(tc[
Use ast.literal_eval():
>>> import ast >>> tc='(107, 189)' >>> tc_tuple = ast.literal_eval(tc) >>> tc_tuple (107, 189) >>> tc_tuple[0] 107