Python-Comments

Wed 12 November 2025
#  created : 20250112
#  https://www.scientecheasy.com/2022/09/comments-in-python.html/
#  in python comments are written in (#) symbol
print('Hello mate!!')  # this will not get print in the output
Hello mate!!
name = "Jerin" # Variable declaration and initialization.
print(name)
Jerin
#  multi line comments used like this 
'''
I 
am
multiline 
comments
'''
'\nI \nam\nmultiline \ncomments\n'
"""Python
program
to calculate
the sum of
three
numbers.
"""
def sum(x, y, z):
    s = x + y + z
    print("Sum of three numbers = ", s)
sum(10, 20, 30)
Sum of three numbers =  60
# so in the comments section we actually define our code functionality and some clear explane=tion about our code 
emp_code = "IT-35264"
name = "Jerin"
desig = "Jr. Python Developer"
comp = "tact"
salary = "USD 40000"
"""python program
that we used a 
sequence escape  
method
"""
print("Employee code: ", emp_code, "\nName: ", name)
print("Designation: ",desig, "\tCompany: ", comp)
print("Annual Salary: ", salary)
Employee code:  IT-35264 
Name:  Jerin
Designation:  Jr. Python Developer  Company:  tact
Annual Salary:  USD 40000


Score: 10

Category: python-basics