Introduction to Python
Curiosity and zeal to learn something new have probably brought you here. It doesn’t matter whether you are new to programming or switching from some other redundant or less useful language, you must be having a few very important questions in your mind. We will be answering most of them in this section.
What is Python?
Python’s official website says as under:-
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
Quite overwhelming, isn’t it? For a layman, Python is a very popular programming language created by Guido van Rossum in 1991.
What can I do with Python?
Now, this is the question, where the things get interesting. Python can be used for a lot of things, but the most important and popular usage of python are:-
- Server-side web development using Django or Flask.
- Data Sciences including Machine Learning, Data Analysis & Visualisation.
- Automating the stuff also known as scripting.
Why Python?
I will answer this by asking another question- Why not? Go through the following reasons and decide yourself:-
- It has a very easy to learn and readable syntax. e.g. print(“Hello World”) will do exactly the same how it appears in plain English. It will print- “Hello World”.
- It is compatible with all major platforms and systems be it Windows, MacOs, Linux or Raspberry Pi.
- It has a robust standard library which has a wide range of modules which can be used out-of-the-box for many of your use-cases or can be tweaked with.
- It runs on an interpreter system and the code can be executed quickly after writing it.
- It fully supports object-oriented programming as well as functional programming.
- It is ever evolving language.
Which Python version should I learn?
Without giving any explanation I will urge you to start with the latest stable version of Python 3. At the time of writing this tutorial, the latest stable version is Python 3.7.2. You can check for the latest stable version from here.
Table of contents
Setting up your Machine for Python- Chapter 2
कुछ नया सीखने की जिज्ञासा और उत्साह शायद आपको यहां खींच लाया है। इससे कोई फर्क नहीं पड़ता कि आप प्रोग्रामिंग के लिए नए हैं या किसी अन्य निरर्थक या कम उपयोगी भाषा से स्विच कर रहे हैं, आपके दिमाग में कुछ बहुत ही महत्वपूर्ण प्रश्न होने चाहिए। हम इस खंड में उनमें से अधिकांश का जवाब देंगे
Python क्या है?
Official website के अनुसार Python का अर्थ निमनलिखित है:-
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
काफी भारी, है ना? एक आम आदमी के लिए, Python 1991 में गुइडो वैन रोसुम द्वारा बनाई गई एक बहुत ही लोकप्रिय प्रोग्रामिंग भाषा है।
मैं Python के साथ क्या कर सकता हूं?
अब, यह सवाल है, जहां चीजें दिलचस्प हो जाती हैं। Python का उपयोग बहुत सारी चीजों के लिए किया जा सकता है, लेकिन Python के सबसे महत्वपूर्ण और लोकप्रिय उपयोग हैं:
- Django या Flask का उपयोग कर सर्वर-साइड वेब डेवलपमेंट।
- मशीन लर्निंग, डेटा विश्लेषण और विज़ुअलाइज़ेशन सहित डेटा विज्ञान।
- अपने कार्य को automate करने के लिए, जिसे हम scripting भी कहते है।
Python ही क्यूँ?
मैं एक और सवाल पूछकर इसका जवाब दूंगा- क्यों नहीं? निम्नलिखित कारणों को पढ़ें और स्वयं निर्णय लें: -
- यह सीखने में काफ़ी आसान है ओर इसका syntax काफ़ी readable है। जैसे के print(“Hello World”) वैसा ही करेगा जैसे साधारण अंग्रेज़ी में पढ़ने से प्रतीत होता है, यह स्क्रीन पर “Hello World” प्रिंट करेगा।
- यह सभी प्रमुख platforms व system के साथ कम्पैटिबल है जैसे के Windows, MacOs, Linux or Raspberry Pi.
- इसकी standard library काफ़ी अछी है जिसमें काफ़ी तरह के modules है जीने अपनी ज़रूरत के हिसाब से यू के तू इस्तमाल किया जा सकता है या उसमें कुछ तब्दीली करके इस्तमाल किया जा सकता है।
- यह interpreter system पर चलती है इसलिए आप कोड लिखते ही उसे रन करके देख सकते है।
- यह object-oriented programming के साथ साथ functional programming support करती है.
- यह प्रतिदिन विकसित होने वाली भाषा है।
मुझे Python का कौनसा version सिखना चाहिए ?
कोई स्पष्टीकरण दिए बिना मैं आपको Python 3 के नवीनतम stable version के साथ शुरू करने का आग्रह करूंगा। इस ट्यूटोरियल को लिखने के समय, नवीनतम stable version 3.7.2 है।
Table of contents
Chapter 2 - Quick Setup