How to Print Multiple Arguments in Python


If you need to print out multiple arguments using Python, then you can do one of the following:

Option 1 – Using print

print("Something", "Else", "Please")

Output: Something Else Please

Option 2 – Using String Formatting

print("Something {} {}".format("Else", "Please"))

Output: Something Else Please

Or with explicit ordering:

print("Something {1} {0}".format("Else", "Please"))

Output: Something Please Else

Option 3 – Using F-String Formatting

one = "Something"
two = "Else"
three = "Please"

print(f"{one} {two} {three}")

Output: Something Else Please