The print command can be used to print text to the console in Python. In this example, the text Hello World is printed to the console.
print("Hello World")
Or, if the variable foo contains a value of bar, this will print bar to the console.
print(foo)
To print both text and a variable, use the + character.
print("Hello World " + foo)