HackerRank Transpose and Flatten in python problem solution - TheCScience