[Python3] Runtime: 28 ms, faster than 99.71% | Memory: 13.8 MB, less than 96.26%
\nclass Solution:\n    def deleteDuplicates(self, head: ListNode) -> ListNode:\n        fake = ListNode(0, head)\n        pred = fake\n        while head:\n    
```\nclass Solution:\n    def deleteDuplicates(self, head: ListNode) -> ListNode:\n        fake = ListNode(0, head)\n        pred = fake\n        while head:\n            if head.next and head.val==head.next.val:\n                while head.next and head.val==head.next.val:\n                    head = head.next\n                pred.next = head.next\n            else: \n\t\t\t\tpred = pred.next\n            head = head.next\n        return fake.next\n```
['Linked List', 'Python']