Introduction to Python

Python Programming

Python is a powerful modern computer programming language. It allows you to use variables without declaring them (i.e., it determines types implicitly), and it relies on indentation as a control structure. You are not forced to define classes in Python (unlike Java) but you are free to do so when convenient.
It was developed by Guido van Rossum, and it is free software. Free as in “free beer,” in that you can obtain Python without spending any money. But Python is also free in other important ways, for example you are free to copy it as many times as you like, and free to study the source code, and make changes to it. There is a worldwide movement behind the idea of free software, initiated in 1983 by Richard Stallman.
This tutorial focuses on learning Python basics for the purpose of learning Data Science. Python is a good choice for mathematical calculations, since we can write code quickly, test it easily, and its syntax is similar to the way mathematical ideas are expressed in the mathematical literature.

Features:

  • Open source general-purpose language.

  • Object Oriented, Procedural, Functional

  • Easy to interface with C/ObjC/Java/Fortran

  • Easy-ish to interface with C++ (via SWIG)

  • Great interactive environment

  • Easier to learn

  • Simple Elegant Syntax

  • Great Community and Support

Downloads:

http://www.python.org

Documentation:

http://www.python.org/doc/

Applications:

Scientific and Numeric Computing:

First of all, there are numerous libraries available in Python for scientific and numeric computing. There are libraries like: SciPy and NumPy that are used in general purpose computing. And, there are specific libraries like: EarthPy for earth science, AstroPy for Astronomy and so on. Also, the language is heavily used in machine learning, data mining and deep learning.

Web Applications:

You can also create scalable Web Apps using frameworks and CMS (Content Management System) that are built on Python. Some of the popular platforms for creating Web Apps are: Django, Flask, Pyramid, Plone, Django CMS. Sites like Mozilla, Reddit, Instagram and PBS are written in Python.

 

Creating software Prototypes:

Python is slow compared to compiled languages like C++ and Java. It might not be a good choice if resources are limited and efficiency is a must. However, Python is a great language for creating prototypes. For example: You can use Pygame (library for creating games) to create your game’s prototype first. If you like the prototype, you can use language like C++ to create the actual game.

Good Language to Learn Programming:

Finally, Python is one of the easiest language to learn because of its simple easy-to-use syntax. It is used by many companies to teach programming to newbies. It is a good language with a lot of features and capabilities.

 

Note: There are two major Python versions, Python 2.x and Python 3.x. Python 2.x and 3.x are  quite different. This tutorial uses Python 3.x, because it more semantically correct and supports newer features.

Installing Python in Windows