printing text in python code example

Example 1: how to print in python

#a string, to indicate it is a string you can use ("") or ('')
print("hello world")
#a integer 
print(19)
# a float:
print(4.5)

Example 2: print in python

# Simple Print:
print("Hello World!")

# Formatting message in python3.6- :
name = "World"
print("Hello {}!".format(name))

# Formatting message in python3.7+ :
name = "World"
print(f"Hello {name}!")

Example 3: how to print python text

print ("Example")

Example 4: python print text

print("The text you want to print")