input: Write a function to detect a loop in a linked list.
  assert detectLoop(node1) == True  # Assuming node1 is part of a circular linked list
  assert detectLoop(node2) == False  # Assuming node2 is the head of a non-circular linked list
  assert detectLoop(node3) == True  # Assuming node3 is part of another circular linked list
output: def detectLoop(head):
      slow = head
      fast = head
      
      while fast is not None and fast.next is not None:
          slow = slow.next
          fast = fast.next.next
          
          if slow == fast:
              return True
      
      return False