Important Notice:

Comments in Python

Comments in Python

5 views 1 min read

Comments in Python :-

Comment (कमेंट) वह Text (टेक्स्ट) या Note (नोट) होता है जिसे Python Interpreter (इंटरप्रेटर) Program के Execution (निष्पादन) के दौरान Ignore (अनदेखा) कर देता है। अर्थात Comment को Execute नहीं किया जाता।

Comments का मुख्य उद्देश्य Program को Explain (समझाना), Document (दस्तावेज़ तैयार करना) तथा Code को अधिक Readable (पढ़ने योग्य) बनाना होता है।

जब कोई Programmer अपना Program लिखता है, तो वह भविष्य में स्वयं या किसी अन्य Programmer की सुविधा के लिए आवश्यक जानकारी Comments के रूप में लिख सकता है।

English

A Comment is a piece of text that is ignored by the Python interpreter during program execution.

Comments are used to explain the code, write documentation, and make the program easier to read and understand.

A programmer can also use comments to leave notes for themselves or other programmers.

Types of Comments (Comments के प्रकार) -

Python में मुख्य रूप से दो प्रकार (Two Types) के Comments उपयोग किए जाते हैं।

  1. Single-Line Comment (सिंगल-लाइन कमेंट)
  2. Multi-Line Comment (मल्टी-लाइन कमेंट)

Related Notes