code: def common_segment_count(path, value):
      
      i = 0
      if len(path) <= len(value):
          for x1, x2 in zip(path, value):
              if x1 == x2:
                  i += 1
              else:
                  return 0
      return i
docs: Return the number of path segments common to both