input: Write a function to determine if a linked list implemented using classes contains any cycle. If it contains a cycle, return True, else return False. If the given linked list is empty, return False.
  assert has_cycle(linked_list)==False
  assert has_cycle(cyclic_linked_list)==True
  assert has_cycle(empty_linked_list)==False
output: def has_cycle(head):
      if not head:
          return False
      slow = head
      fast = head.next
      while fast and fast.next:
          if slow == fast:
              return True
          slow = slow.next
          fast = fast.next.next
      return False