I want to achieve this function in Python like Matlab
in matlab, the code is (B and C are variables in loop)
A = [];
for ii = 1:10
A = [A, B, C]
end
but in Python, use np.hstack or np.concatenate, the ndarray must have same number of dimensions
and, that is my Python code
for ii in range(10):
if ii == 0:
A = np.hstack([B, C])
else:
A = np.hstack([A, B, C])
but, i think it a little troublesome and unreadable.
how can i rewrite it?(It's better to use only one line of code)