>>> s = "(1, 2, 3, 4)" >>> a = tuple([int(e) for e in s.strip('()').split(',')]) >>> a (1, 2, 3, 4) >>>