Krivalar Tutorials 
Krivalar Tutorials

Python Programming - comments, single line comment, multiline comment



<Variable    Data Types >






Comments are used for documentation purpose. Nowadays, the program grows very fast. Hence, the program became more complex and difficult to read. For this reason, we can often add comments telling us what it is doing or why it is.

Comments are ueful for during review or revisit the program.

In Python, comments start with the (#) symbol which tells the interpreter to ignore the line and proceed to the next line in the program.

# The folloing is the welcome message
>> print("Welcome to ALL")
>> Welcome to ALL

we can also place comment at the end of the statement.

>> print(4+3)  # Addition of two number
>> 7

Multi-Line Comment

Sometimes, the comments are span over the multiple lines, we can connect those lines together by placing (#) symbol at the beginning of each line.

# Following is the addition of two numbers A and B
# the result will be stored in C
# print the result
>> A=10
>> B=4
>> C=A+B
>> print(C)
>> 14

Another way to specify the multi-line comments,you can use triple quotes(""") at the start and end of the multi-lines comment.

""" Following is the addition of two number A & B and
the result will be stored in C , and
Print the result """
>> A=10
>> B=20
>> C=A+B
>> print(C)
>> 30

<Variable    Data Types >





















Searching using Binary Search Tree