python print values and text code example

Example 1: print text python

# To print text on a screen you need to use the print function
# Example:
>>> print('Hello, world!')
Hello, world!
# You can change Hello, world! to I am learning python!
>>> print('I am learning python!')
I am learning python!
# If you want to print a variable you can put the variable name
# in the function
a = 'I am text'
print(a)
I am text
# You can also print expressions like this
print(5 * 7)
35

Example 2: python print text

print("The text you want to print")