FreeKB - Python (Scripting) Printing text to the console (print)
Python (Scripting) - Printing text to the console (print)

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.



To print both text and a variable, use the + character.

print("Hello World " + foo)


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter aecb3 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |