LearnPy Hub
← Comprehensions problems
Medium

Flatten a Grid

Read r, then r lines of integers. Print all numbers in one flat list using a nested comprehension.

Input

r, then r lines.

Output

A list.

Sample 1

Input
2
1 2
3 4
Output
[1, 2, 3, 4]

Sample 2

Input
1
5
Output
[5]
solution.py
Output appears here
Flatten a Grid · Python practice problem · LearnPy Hub