Sunday, 14 June 2020

How to use python print()

In our first program of python we will learn how to use print() method to print something over the screen. For this we have print() method in python. We don't need to import any class to run this s method. 

Let's understand this with example:

# I am going to print "hello world" without quote
print("hello world")
Output: hello world

Or we can do it as 

print('hello python')
Output: hello python

We can also print maths calculations like
print(9+8)
Output: 17

print(2*2)
Output: 4

Either we can use single quote (' ') or dual quote (" ").