Is there anyway I could round-up numbers within a tuple to two decimal points, from this:
(\'string 1\', 1234.55555, 5.66666, \'string2\')
List comprehension solution:
t = ('string 1', 1234.55555, 5.66666, 'string2') solution = tuple([round(x,2) if isinstance(x, float) else x for x in t])