Chapter: Problem Solving and Python Programming : Data, Expressions, Statements

Comments - Python

A hash sign (#) is the beginning of a comment.

COMMENTS:

 

v   A hash sign (#) is the beginning of a comment.

v   Anything written after # in a line is ignored by interpreter.

Eg:percentage = (minute * 100) / 60        # calculating percentage of an hour

v   Python does not have multiple-line commenting feature. You have to

comment each line individually as follows :


Example:

#               This is a comment.

#               This is a comment, too.

#               I said that already.

 

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Problem Solving and Python Programming : Data, Expressions, Statements : Comments - Python |

Related Topics

Problem Solving and Python Programming : Data, Expressions, Statements


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2024 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.