Flatten a Matrix

Flatten the 3×3 matrix into a 1D array using flatten().
Python
Setting up Python environment...
Output