🔥🔥🔥🔥🔥 Beat 99% 🔥🔥🔥🔥🔥 EASY 🔥🔥🔥🔥🔥🔥
\n\n\n# Code\n\n# Definition for singly-linked list.\n# class ListNode(object):\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#       
![Screenshot 2024-03-20 194427.png](https://assets.leetcode.com/users/images/ce8031a7-1e68-4fda-b2f2-10ed42a7c458_1710956751.2339694.png)\n\n\n# Code\n```\n# Definition for singly-linked list.\n# class ListNode(object):\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#         self.next = next\nclass Solution(object):\n    def mergeInBetween(self, list1, a, b, list2):\n        """\n        :type list1: ListNode\n        :type a: int\n        :type b: int\n        :type list2: ListNode\n        :rtype: ListNode\n        """\n        fast = list1\n        slow = list1\n        for _ in range(a-1): # Catch first node befor removing\n            fast= fast.next\n            slow= slow.next\n        for _ in range(a, b+2): # Catch first node after removing\n            fast = fast.next\n        slow.next = list2 # link slow node to list2\n        while list2.next is not None: \n            list2 = list2.next\n        list2.next = fast # link last node of list2 to fast node\n        return list1\n```
['Python', 'Python3']