How to concatenate output when parallelizing

This code will calculate the maximum element for each processor and display several lines.

max_f = np.abs(np.array(f_n.vector())).max()
print('t = %.4f:  max_f = %.6f' % (t,  max_f))

I want to count the maximum element out of these and output only that. How should I do it?

Use MPI.allreduce, as shown in Attempt to find max value on mesh in parallel - #2 by dokken