yup, thats true. I just merge my part in already existing code by preserving the original syntax. Until I see this code I dint come across the function cmp(). But thanks for the suggestions 'PYTHON GURUS' :D