import numpy
......
# Prediction
predictions = model.predict(X_test)
# round predictions
rounded = [round(x) for x in predictions]
print(rounded)
\"predictions\"
You're using a function that uses Numpy to store values. Instead of being a regular Python list, it is actually a Numpy array. This is generally because with machine learning, Numpy does a much better job at storing massive amounts of data compared to an ordinary list in Python. You can refer to the following documentation to convert to a regular list which you can then preform a comprehension:
https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tolist.html
Edit:
What happens if you try:
for x in predictions:
for y in x.:
print(y, end=' ')