Zigzag Conversion (LeetCode 6).
Asked in the DSA round stage. Given a string s and an integer numRows, write the characters in a zigzag pattern across the specified rows, then return the result obtained by reading each row from top to bottom.
Implement convert(s, numRows). Return a string. If numRows is 1 or at least the string length, return s unchanged.
def convert(s, numRows):