How To Handle Duplicate In Python