Python Basics

1. Introduction to Python


Python is a high-level, interpreted scripting language developed in the late 1980s by Guido van Rossum at the National Research Institute for Mathematics and Computer Science in the Netherlands. The initial version was published at the alt.sources newsgroup in 1991, and version 1.0 was released in 1994.

Python 2.0 was released in 2000, and the 2.x versions were the prevalent releases until December 2008. At that time, the development team made the decision to release version 3.0, which contained a few relatively small but significant changes that were not backward compatible with the 2.x versions. Python 2 and 3 are very similar, and some features of Python 3 have been backported to Python 2. But in general, they remain not quite compatible.

Both Python 2 and 3 have continued to be maintained and developed, with periodic release updates for both. As of this writing, the most recent versions available are 2.7.15 and 3.6.5. However, an official End Of Life date of January 1, 2020 has been established for Python 2, after which time it will no longer be maintained. If you are a newcomer to Python, it is recommended that you focus on Python 3, as this tutorial will do.

Python is still maintained by a core development team at the Institute, and Guido is still in charge, having been given the title of BDFL (Benevolent Dictator For Life) by the Python community. The name Python, by the way, derives not from the snake, but from the British comedy troupe Monty Python’s Flying Circus, of which Guido was, and presumably still is, a fan. It is common to find references to Monty Python sketches and movies scattered throughout the Python documentation.



What others do with Python?


You’re probably wondering what people are building with Python in the real world. So first, let’s take a quick look at how some of the big tech companies are using the language.

Google is a company that has used Python from the start, and it’s gained a place as one of the tech giant’s main server-side languages. Guido van Rossum, Python’s Benevolent Dictator for Life, even worked there for several years, overseeing the language’s development.

Instagram likes Python for its simplicity. The service is known for running “the world’s largest deployment of the Django web framework, which is written entirely in Python.”

Spotify puts the language to use in its data analysis and back-end services. According to their team, Python’s ease of use leads to a lightning-fast development pipeline. Spotify performs a ton of analyses to give recommendations to their users, so they need something that’s simple but also works well. Python to the rescue!



What you can do with Python?


  • #1: Automate the Boring Stuff
  • #2: Create a Calculator
  • #3: Perform Basic Data Analysis
  • #4: Mine Twitter Data
  • #5: Build a Microblog with Flask
  • #6: Scientific and Numeric Computation
  • #7: Play PyGames
  • #8: Create GUI Applications
  • #9: Use it for Machine Learning and Deep Learning
  • #10: Build your own server using Flask and Django
  • #11: Browser Automation
  • #12: Build your own Robots



Download and Installation





Step 1: To download python, go to python.org

Step 2: Go to Downloads section, and select download from the drop down.
Note: This step may vary depending on the operating system.

Step 3: Click the downloaded file and install python in your system, make sure that you enable add to path while installation.

Step 4: Go to start menu and search for IDLE. Open IDLE and start coding.

Step 5: Type the below code in IDLE and check whether you get the output

print("Hello Python")
Output:

. >>> Hello Python


Congratulations! You have done your first code in Python.