How to modify items of a tuple in python?