Posts

Python Variable Assignment

  Variable Assignment Think of a variable as a name attached to a particular object. In Python, variables need not be declared or defined in advance, as is the case in many other programming languages. To create a variable, you just assign it a value and then start using it. Assignment is done with a single equals sign ( = ): >>> >>> n = 300 This is read or interpreted as “ n  is assigned the value  300 .” Once this is done,  n  can be used in a statement or expression, and its value will be substituted: >>> >>> print ( n ) 300 Just as a literal value can be displayed directly from the interpreter prompt in a REPL session without the need for  print() , so can a variable: >>> >>> n 300 Later, if you change the value of  n  and use it again, the new value will be substituted instead: >>> >>> n = 1000 >>> print ( n ) 1000 >>> n 1000 Python also al...

What is a python

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics डायनामिक टाइपिंग और डायनेमिक बाइंडिंग के साथ संयुक्त डेटा संरचनाओं में निर्मित इसका उच्च-स्तर, रैपिड एप्लिकेशन डेवलपमेंट के लिए बहुत आकर्षक बनाता है, साथ ही मौजूदा घटकों को एक साथ जोड़ने के लिए स्क्रिप्टिंग या गोंद भाषा के रूप में उपयोग करता है।  सिंटैक्स सीखने में आसान पायथन सरल, पठनीयता पर जोर देता है और इसलिए कार्यक्रम रखरखाव की लागत को कम करता है।  पायथन मॉड्यूल और पैकेज का समर्थन करता है, जो प्रोग्राम मॉड्युलैरिटी और कोड के पुन: उपयोग को प्रोत्साहित करता है।  पायथन दुभाषिया और व्यापक मानक पुस्तकालय सभी प्रमुख प्लेटफार्मों के लिए प्रभार के बिना स्रोत या द्विआधारी रूप में उपलब्ध हैं, और स्वतंत्र रूप से वितरित किया जा सकता है। अक्सर, प्रोग्रामर इसे प्रदान की गई उत्पादकता के कारण पायथन के प्यार में पड़ जाते हैं।  चूंकि कोई संकलन कदम नहीं है, इसलिए संपादन-परीक्षण-डिबग चक्र अविश्वसनीय रूप से तेज है।  पायथन कार्यक्रमों को डीबग करना आसान है: बग या खराब इनपुट कभी भी विभ...