parameters: (self, s, numRows)
return_statement: return zigzag
docstring: :type s: str
          :type numRows: int
          :rtype: str
docstring_summary: :type s: str
          :type numRows: int
          :rtype: str
docstring_tokens: : type s : str : type numRows : int : rtype : str
function: def convert(self, s, numRows):
          """
          :type s: str
          :type numRows: int
          :rtype: str
          """
          if numRows == 1:
              return s
          step, zigzag = 2 * numRows - 2, ""
          for i in xrange(numRows):
              for j in xrange(i, len(s), step):
                  zigzag += s[j]
                  if 0 < i < numRows - 1 and j + step - 2 * i < len(s):
                      zigzag += s[j + step - 2 * i]
          return zigzag
function_tokens: def convert ( self , s , numRows ) : if numRows == 1 : return s step , zigzag = 2 * numRows - 2 , "" for i in xrange ( numRows ) : for j in xrange ( i , len ( s ) , step ) : zigzag += s [ j ] if 0 < i < numRows - 1 and j + step - 2 * i < len ( s ) : zigzag += s [ j + step - 2 * i ] return zigzag