Better printing for both Python 2 and Python 3