My accepted Python code
Code\n\nclass Solution(object):\n    def deleteDuplicates(self, head):\n        if head is not None:\n            if head.next is not None:\n                if 
# Code\n```\nclass Solution(object):\n    def deleteDuplicates(self, head):\n        if head is not None:\n            if head.next is not None:\n                if head.val == head.next.val:\n                    headTemp = self.deleteDuplicates(head.next)\n                    if headTemp is not None:\n                        if head.val == headTemp.val:\n                            if headTemp is not None:\n                                return headTemp.next\n                            return None\n                    return headTemp\n                else:\n                    head.next = self.deleteDuplicates(head.next)\n        return head\n```
['Python']