Printing in Python 3


How do I complete this task using Python 3 syntax?

FAQ: Learn Python – Strings & Console Output – String Formatting with %, Part 1

String Formatting with %, Part 1

In Python 3 print() is a function so must have parens around the argument.

print ("%s %s %s" % (arg1, arg2, arg3))
       ------- print argument -------

You’ll find that this also works in Python 2, so get in some practice using parens on print statements so it becomes a natural habit as you move forward.