The first instruction you will most likely learn when using Python is the print() instruction. It is used to display/output a message on screen.
print("Hello World")
Using Variables
The print command can be used to output the content of a variable:
username="admin" print("You are logged as:") print(username)
Using String Concatenation
You can join multiple strings together (string concatenation using +) to print them on a single line:
username="admin" print("You are logged as:" + username)
Casting numbers (e.g integers) into string and vice-versa:
You can convert (cast) a number (e.g integer) into a string using the str() function or convert/cast a string into an integer using the int() function:
score=10 print("Your score:" + str(score))