Added duplicates.py code