python3 print statement code example

Example 1: how to print in python

print("hello world")

Example 2: print() in python

print('hi, baby!')

Example 3: 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 4: 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)
# a bool:
print (True)
print (False)