redid in python