def transpose(matrix):
    """
    IMPORTANT: You should only use list comprehension for this question.
    Follow the syntax guidelines in the writeup.

    Takes in a list of lists representation of a matrix and
    returns its transpose, also as a list of lists.

    >>> arr1 = transpose([[1,2,3],[4,5,6],[7,8,9]])
    >>> print(arr1)
    [[1, 4, 7], [2, 5, 8], [3, 6, 9]]

    This test is simply to help you visualize your output,
    it is in no way a hint or part of the solution
    >>> print('\\n'.join(''.join(str(i)) for i in arr1))
    [1, 4, 7]
    [2, 5, 8]
    [3, 6, 9]

    >>> transpose([[1]])
    [[1]]

    >>> arr2 = transpose([[1,2],[3,4],[5,6]])
    >>> print(arr2)
    [[1, 3, 5], [2, 4, 6]]

    >>> print('\\n'.join(''.join(str(i)) for i in arr2))
    [1, 3, 5]
    [2, 4, 6]

    >>> arr3 = transpose([[1],[2],[3],[4],[5],[6]])
    >>> print(arr3)
    [[1, 2, 3, 4, 5, 6]]

    >>> print('\\n'.join(''.join(str(i)) for i in arr3))
    [1, 2, 3, 4, 5, 6]

    """
    return [[matrix[i][x] for i in range(0, len(matrix))] \
            for x in range(0, len(matrix[0]))]