How to print arrays inside functions?

I always get confused by all the printing functions, but in the end I do display(A) in my tests, is this not the way to go?