How To Handle Duplicate Values In Python