[Python](https://www.python.org) is a general purpose programming language that is dynamically typed, interpreted, and is known for its easy readability with great design principles. It was created by Guido van Rossum and released in 1991. Since then, the language has exploded in popularity.
> If you're new to programming, you've made the right choice. Python is the perfect beginners' language. It has a clear and simple syntax that will get you writing useful programs in short order. Python even has an interactive mode, which offers immediate feedback, allowing you to test out new ideas almost instantly.
If you've done some programming before, you've still made the right choice. Python has all the power and flexibility you'd expect from a modern, object-oriented programming language. But even with all of its power, you may be surprised how quickly you can build programs. In fact, ideas translate so quickly to the computer, Python has been called "programming at the speed of thought".
- [Python 2.x will not be maintained past 2020](https://www.python.org/dev/peps/pep-0373/)
- 3.x is under active development. This means that all recent standard library improvements, for example, are only available by default in Python 3.x
- The Python ecosystem has amassed a significant amount of quality software over the years. The downside of breaking backwards compatibility in 3.x is that some of that software (especially in-house software in companies) still doesn't yet work on 3.x
Most *nix based operating systems (including Mac OS) come with Python installed. Replacing a system’s native Python, whatever its version is, is not recommended and may cause problems because the version installed could be being used for some necessary internal services or tools. However, different versions of Python can be safely installed alongside the system Python. See [Python Setup and Usage](https://docs.python.org/3/using/index.html).
Python doesn't ship with Windows. The installer and instructions can be found <ahref='https://docs.python.org/3/using/windows.html'target='_blank'rel='nofollow'>here</a>.
Linux operating systems come with different versions of Python pre-installed. However to install Python 3.x on Linux, follow this [link](https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-linux-python.html).
MacOS doesn't come with Python 3 (however Python 2.7 pre-installed by Apple), the installer and instructions can be found [here](https://docs.python.org/3/using/mac.html).
In your terminal, type the command `python` followed by the script name to invoke the interpreter and run the script. This will determine whether the interpreter is available and in Unix shell’s search path.
When multiple versions of Python are installed, calling them by version may be possible depending on the install configuration. In the Cloud9 IDE custom environment, they can be invoked as shown below:
There are many common applications for interactive Python including the one built in to your Python version, available at the command prompt by invoking the version name, as well downloadable applications such as Idle, Spyder and many more.
The principles that influenced the design of Python are included as an Easter egg, and can be read by using the following command inside the Python interpreter interactive mode:
- Don't have to worry about range of data types. For instance, in the C language, we have to specify data types such as `int`, `long int`, `long long int`.
- Being open source, many different ways have developed over the years for the same function. This can sometimes create chaos for others when reading someone else's code.
Another important reference is the Python Enhancement Proposals [PEPs](https://www.python.org/dev/peps/). Included in the PEPs is a style guide for writing Python code, [`PEP 8`](https://www.python.org/dev/peps/pep-0008/).
Inline `print` statements can be used for simple debugging:
> **... often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.**
Going back to the docs, we can read about the [`print`](https://docs.python.org/3/library/functions.html#print) function, a ['nofollow'](https://docs.python.org/3/library/functions.html) of the [Python Standard Library](https://docs.python.org/3/library/index.html.
The built-in functions are listed in alphabetical order. The name is followed by a parenthesized list of formal parameters with optional default values. Under that is a short description of the function and its parameters are given. Occasionally, an example is provided.
The [`print`](https://docs.python.org/3/library/functions.html#print) function in Python 3 replaces the [`print`](https://docs.python.org/2/reference/simple_stmts.html#print) statement in Python 2.
A function is called when the name of the function is followed by `()`. For the 'Hello, World!' example, the print function is called with a string as an argument for the first parameter. For the rest of the parameters, default values are used.
The argument that we called the `print` function with is a `str` object or _string_, one of Python's [_built-in data types_](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str).
Also the most important thing about python is that you don't have to specify the data type while declaring a variable Python's compiler will do that itself, based on the type of value assigned.
As stated, Python is a general purpose language. You can use it to do anything you like but one of the major uses of Python is in machine learning and artificial intelligence. It is also a popular language in web development with some amazing frameworks like [Django](https://www.djangoproject.com/) and [flask](http://flask.pocoo.org/). It is also a popular scripting language. With its easy to read syntax it is becoming one the most popular programming languages, growing rapidly in different fields.