for i in A:
print(' '.join(map(str, i)))
void printElements(int* arr,int r,int c){
for (int i = 0; i < r; ++i){
for (int j = 0; j < c; ++j){
cout<<( *((arr + i * c) + j))<<" ";
}
cout<<"
";
}
return;
}
// To call this function:
printElements(*array, row, column);
import numpy as np
A = [['A', 'B'], ['C', 'D']]
print(np.matrix(A))
2-D Vectors
vector<vector<int>> vect;
for (int i = 0; i < vect.size(); i++)
{
for (int j = 0; j < vect[i].size(); j++)
{
cout << vect[i][j] << " ";
}
cout << endl;
}