Print function in python

Print function in python



Print function is a function which is used to display message to screen or standard output 



The rules should be followed

1. Either we can use single quotes or double quotes

Single quote



Output:

hello world

Double quotes

Output:

hello world


2. Don't use different quotes (single, double) quotes to print string



Output:


3. Single quote can be embedded in double quotes and vice versa


Output:



4. In order to print name's like in single quotes we have to use \ that means to ignore next single quote 



Output:


All those above are possible printing ways in python

Image credits: Programiz


Disclaimer: All the above images used in this blog are owned by respective owners. Please contact me for any removal of images. No copyright infringement




Comments

Popular posts from this blog

Variable declaration in python

Python data types