input: Write a function to check if a list has a sublist with a given sum.
  assert has_sublist_with_sum([2, 3, 4], 8) == True
  assert has_sublist_with_sum([1, 2, 3, 4, 5], 9) == True
  assert has_sublist_with_sum([1, 2, 3, 4, 5], 20) == False
output: def has_sublist_with_sum(lst, target):
      for start in range(len(lst)):
          current_sum = 0
          for end in range(start, len(lst)):
              current_sum += lst[end]
              if current_sum == target:
                  return True
              if current_sum > target:
                  break
      return False