comefrom: <garvit244>830_1.py
code: def largeGroupPositions( S):
      if not S:
          return []
      
      result = []
      count = 1
      prevChar = S[0]
      index_i = 0
      for index in range(1,len(S)):
          if S[index] == prevChar:
              count += 1
          else:
              if count >= 3:
                  result.append([index_i, index-1])
              
              count = 1
              prevChar = S[index]
              index_i = index
              
      if count >= 3:
          result.append([index_i, len(S)-1])
      return result
masked: def sample_funcname ( var_0 ) :
      if not var_0 :
          return [ ]
      var_1 = [ ]
      var_3 = 1
      var_5 = var_0 [ 0 ]
      var_6 = 0
      for var_9 in range ( 1 , len ( var_0 ) ) :
          if var_0 [ var_9 ] == var_5 :
              var_3 += 1
          else :
              if var_3 >= 3 :
                  var_1.append ( [ var_6 , var_9 - 1 ] )
              var_3 = 1
              var_5 = var_0 [ var_9 ]
              var_6 = var_9
      if var_3 >= 3 :
          var_1.append ( [ var_6 , len ( var_0 ) - 1 ] )
      return var_1
  