py3: convert print to a function