comefrom: <qiyuangong>006_ZigZag_Conversion_1.py
code: def convert( s, numRows):
      ls = len(s)
      if ls <= 1 or numRows == 1:
          return s
      temp_s = []
      for i in range(numRows):
          temp_s.append(['']*(ls / 2))
      inter = numRows - 1
      col, row = 0, 0
      for i, ch in enumerate(s):
          flag = True
          if (i / inter) % 2 == 1:
              
              flag = False
          if flag:
              temp_s[row][col] = ch
              row += 1
          else:
              temp_s[row][col] = ch
              col += 1
              row -= 1
      result = ''
      for i in range(numRows):
          result += ''.join(temp_s[i])
      return result
masked: def sample_funcname ( var_0 , var_1 ) :
      var_3 = len ( var_0 )
      if var_3 <= 1 or var_1 == 1 :
          return var_0
      var_5 = [ ]
      for var_7 in range ( var_1 ) :
          var_5.append ( [ '' ] * ( var_3 / 2 ) )
      var_11 = var_1 - 1
      var_13 , var_14 = 0 , 0
      for var_7 , var_16 in enumerate ( var_0 ) :
          var_18 = True
          if ( var_7 / var_11 ) % 2 == 1 :
              var_18 = False
          if var_18 :
              var_5 [ var_14 ] [ var_13 ] = var_16
              var_14 += 1
          else :
              var_5 [ var_14 ] [ var_13 ] = var_16
              var_13 += 1
              var_14 -= 1
      var_20 = ''
      for var_7 in range ( var_1 ) :
          var_20 += ''.join ( var_5 [ var_7 ] )
      return var_20
  