My Python Solution Beats 91%
\nclass Solution(object):\n    def deleteDuplicates(self, head):\n        """\n        :type head: ListNode\n        :rtype: ListNode\n        """\n        \n  
```\nclass Solution(object):\n    def deleteDuplicates(self, head):\n        """\n        :type head: ListNode\n        :rtype: ListNode\n        """\n        \n        if head==None:\n            return None\n        \n        dummy=ListNode(0)\n        dummy.next=head\n        \n        cur=head\n        prev=dummy\n        \n        dup=0\n        \n        while cur!=None and cur.next!=None:\n            if cur.val==cur.next.val:\n                cur=cur.next\n                dup=1\n            else:\n                if dup==1:\n                    prev.next=cur.next\n                    cur=cur.next\n                    dup=0\n                else:\n                    prev=cur\n                    cur=cur.next\n        if dup==1:\n            prev.next=cur.next\n            cur=cur.next\n            \n        return dummy.next\n```
['Python']