Variable vs Constant (वैरिएबल और कॉन्स्टैंट में अंतर) :-
Variable (वैरिएबल) और Constant (कॉन्स्टैंट) दोनों का उपयोग Program में Data (डेटा) को Store (संग्रहित) करने के लिए किया जाता है। अंतर केवल इतना है कि Variable की Value Program के दौरान बदली जा सकती है, जबकि Constant की Value सामान्यतः नहीं बदली जाती।
Python में Constant के लिए कोई const Keyword नहीं होता। इसलिए Constant केवल Naming Convention (नामकरण परंपरा) द्वारा दर्शाया जाता है और उसका नाम सामान्यतः UPPERCASE में लिखा जाता है।
English
Both Variables and Constants are used to store data in a program. The main difference is that the value of a variable can change during program execution, whereas the value of a constant is intended to remain unchanged.
Python does not have a const keyword. Therefore, constants are represented only by a naming convention and are usually written in UPPERCASE.
Example :-
ऊपर दिए गए Program में: