comefrom: <qiyuangong>228_Summary_Ranges_2.py
code: def summaryRanges( nums):
      res = []
      start, ls = 0, len(nums)
      for i in range(ls):
          if i + 1 <  ls and nums[i + 1] == nums[i] + 1:
              continue
          if i == start:
              res.append(str(nums[start]))
          else:
              res.append("%d->%d" % (nums[start], nums[i]))
          start = i + 1
      return res
masked: def sample_funcname ( var_0 ) :
      var_1 = [ ]
      var_2 , var_3 = 0 , len ( var_0 )
      for var_4 in range ( var_3 ) :
          if var_4 + 1 < var_3 and var_0 [ var_4 + 1 ] == var_0 [ var_4 ] + 1 :
              continue
          if var_4 == var_2 :
              var_1.append ( str ( var_0 [ var_2 ] ) )
          else :
              var_1.append ( "%d->%d" % ( var_0 [ var_2 ] , var_0 [ var_4 ] ) )
          var_2 = var_4 + 1
      return var_1
  