Modified print as function for Python 3