@@ -0,0 +1,381 @@
+class Solution:%0A    # @return a string%0A%0A    def convert(self, s, nRows):%0A        matrix = %5B%5B%5D for _ in xrange(nRows)%5D%0A        idx, n = 0, len(s)%0A        for pos in itertools.cycle(range(nRows)+range(nRows-2, 0, -1)):%0A            if idx == n:%0A                break%0A            matrix%5Bpos%5D.append(s%5Bidx%5D)%0A            idx += 1%0A        return ''.join(%5B''.join(row) for row in matrix%5D)%0A

add solution for ZigZag Conversion