Print Function and Comments in Python

Print function


The print() function prints the specified message to the screen, or other standard output device.

Example:

print("Hello, World!")
Hello, World!

 

Comments

Comments can be used to explain Python code.
Comments can be used to make the code more readable.
Comments can be used to prevent execution when testing code.
Example:
1.
#This is a comment
print("Hello, World!")

2.
‘’’
This is multiline
 comment.
‘’’
print("Hello, World!")






More will come idea if you watch this video:-







Post a Comment

0 Comments