Introduction to Python
Tags: beginners, programming, python, tutorial
Published: 2022-07-28 13:05:00

# Past and Present of Python

Guido van Rossum created **Python 0.9.0** in 1991. Guido van Rossum began working on Python in the late 1980s, as a successor to the **ABC programming language**. Python was designed by keeping readability in mind. The construct of Python and its approach to Object-Oriented was aimed to help programmers write clear, logical code for small and large-scale projects.

After Python 0.9.0, major Python versions were developed and released by the **Python Software Foundation** (starting from 2.1). There are two major Python versions, **Python 2** and **Python 3**. From the higher level, both seem quite the same except for some syntax changes but they are quite different.

Python 2 was released in 2000 with a new number of features, such as list comprehensions and a garbage collection system. Whereas, Python 3 was released in 2008 and was a major revision of the language that is not completely backward-compatible. As per Python Software Foundation guidelines, Python 2 was discontinued with version 2.7.18 in 2020.

Find more details about Python's history on [Official Documentation](https://docs.python.org/3/license.html) or [Wikipedia](https://en.wikipedia.org/wiki/Python_(programming_language)).

# Features of Python

Python is a **dynamic**, **high-level**, free **open source** and **interpreted** programming language. Python supports object-oriented programming as well as procedural-oriented programming.

The main features of Python are:

1. Easy to Learn and Use:

   Python is easy to learn as compared to other programming languages. Anyone can remember the syntax, rules and regulations of Python very easily.

2. Expressive Language:

   Python can perform complex tasks using a few lines of code.

3. Platform Independent and Portability:

   Python runs in the same manner on different platforms such as Windows, Linux, UNIX, MacOS, etc. The applications which are developed in python on one platform can execute/run on any other platform without making any changes.

4. Interpreted Language:

   In Python, code is executed line by line at a time. Unlike other languages such as C, C++, Java, etc. python does not require compilation of code. As an interpreted language, python code is easy to debug. The source code of python is converted into an immediate form called bytecode.

   To learn more about the Difference between Compiled and Interpreted Language you can read this blog on [GeeksForGeeks](https://www.geeksforgeeks.org/difference-between-compiled-and-interpreted-language/) or [FreeCodeCamp](https://www.freecodecamp.org/news/compiled-versus-interpreted-languages/).

5. Dynamically Typed Language:

   Python does not ask you to _declare the type of a variable_.

6. Object-Oriented Language:

   Python supports object-oriented approaches and concepts. We can implement OOPs features such as Encapsulation, polymorphic, inheritance, abstraction, etc. in Python.

7. Large Standard Library:

   Python provides a huge number of the in-built library. You can use any of these libraries for your application. You can download and install any third-party modules as well from the [Python Package Index](https://pypi.org/).

8. GUI Programming Support:

   You can create Graphical User interfaces (GUI) using modules such as PyQT5, Tkinter and Kivy

9. Extensible, Integrated and Embeddable:

   According to GeeksForGeeks, we can write some Python code into C or C++ language and also we can compile that code in C/C++ language.

   We can easily integrated python with other languages like C, C++, etc. Python code can be also embedded in other languages. By embedding, we can provide somewhat scripting capabilities to other languages.

   _I know this is hard to understand but I just want to show all features. Normally, you will not use this feature._

10. Free and Open Source & Redistribution:

    Python is freely available and as it is open source, source code is also available to the public. Python has adopted the license so that anyone can use and share it after modification of their own.

By showing you these features, I did not want to overwhelm you. I wanted to show you this to let you know the capabilities of Python. So, in future, you will know for what purpose you can and cannot use Python.

# How to Install Python

Finally, Wohooo! A first executable practical step towards Python Programming. So, to download python for your system go to the official Python [website](https://www.python.org/downloads/) and download the latest version. Why the latest version?

So far, python 3 has been backward compatible. It means that you can run code from an older version of Python3 on a newer version of Python3.

## Windows Systems

Once you have downloaded the executable python installer (with .msi) extension, open that file and follow the steps shown in the images.

![How to Install Python on Windows Step-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1hwtx1c5r57t6yy33gcn.png)

![How to Install Python on Windows Step-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zsh955mfu9lzm58dfguu.png)

![How to Install Python on Windows Step-3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ud8szt6lceucx90vfpr.png)

To verify the successful install. Open **CMD** or **PowerShell** and write the following commands:

```bash
python -V
```

You will see an output similar to what is shown in the image. Note that, versions can be different. The version will be based on the time you have downloaded python.

![Verify Python Installation on Windows](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wsuqs7yp0iynqghnezg7.png)

## MacOS Systems

After downloading the installer, open that installer and follow the steps shown in the images.

![How to Install Python on Mac Step-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t4ct93kh8tm1vyor9s0s.png)

![How to Install Python on Mac Step-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60h4rqg3947luluwf26m.png)

![How to Install Python on Mac Step-3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4kzqdpph8zw4neakmu5t.png)

![How to Install Python on Mac Step-4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ji00utgwfpb51kndz127.png)

![How to Install Python on Mac Step-5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1qg80i431eqwkuwrtp7d.png)

![How to Install Python on Mac Step-6](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anvvrrquwck2s4an21qa.png)

To verify the successful install, open **terminal** and write the following commands:

```bash
python3 -V
```

You will see an output similar to what is shown in the image. Note that, versions can be different. The version will be based on the time you have downloaded python.

![Verify Python Installation on Mac](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rskg84e4ir2b08exq7iw.png)

## Linux Systems

Most Debian / Ubuntu / Linux Mint operating systems come with pre-installed python3. To verify if your Ubuntu has python3 installed or not use the following command in the terminal.

```bash
python3 -V
```

![Verify Python Installation on Linux](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9cxbuwx2zjzom4jlax4q.png)

If you don't see any similar output as shown in the image then run the following command in the terminal.

```bash
sudo apt update
```

```bash
sudo apt install python3
```

---

Redhat / RHEL / CentOS-based operating systems by default come with python 2. To verify python 3 on using the following command:

```bash
python3 -V
```

To install Python 3 use:

```bash
yum update -y
```

```bash
yum install -y python3
```

You will see an output similar to what is shown in the image. Note that, versions can be different. The version will be based on the time you have downloaded python.

# Glimpse of Python Code

After the installation and verification process, finally, it is time! Time to run a small piece of code in python.

We will run the old plain program to print **Hello World!** in Python. To write this code open any text editor or code editor and write the following code:

```python
print("Hello World")
```

Now, save this file as **`hello.py`** and open any terminal in the directory where you saved this file.

If you are on windows write the following code:

```bash
python hello.py
```

On Linux-based systems and Mac, write:

```bash
python3 hello.py
```

You will see an output similar to what is shown in the image.

![Glimpse of Python Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m8sey2nl5dnmvdmy2fef.png)

---

# Conclusion

uhhfff, Finally! We are at the end of this section. I know there is a lot in here to process. The features and the installation processes and history. But this is it.

I hope you enjoyed this section and gained some insights into Python.

Make sure to share any thoughts, questions, or concerns. I would love to see them. Let me know if you need any help or want to discuss something. Reach out to me on [Twitter](https://twitter.com/Sahil_Fruitwala), [LinkedIn](https://bit.ly/3JbsPDm) or signup for my [Newsletter](https://newsletter.sahilfruitwala.com/blog).

Thank you for your precious time ❤