Hackerrank Print Function Solution In Python 3