def tupleize(s):
    s = s.strip('()').split(',')
return tuple(int(entry) for entry in s)
pixels = [tupleize(pixel) for pixel in pixels]
How can I evaluate a list of strings as a list of tuples in Python?