Short Tutorial: Introduction to Python

Python is a high-level programming language created by Guido Van Rossum in 1989. Python is very popular among programmers and testers as it is straightforward to learn, use to automate any repetitive IT task very easily. In this article, we will discuss Python2 and Python3, how we can switch between them, the advantages of Python, and the first program in Python.

Short Tutorial: Tuples, Sets and Dictionaries in Python

Download:

https://wiki.python.org/moin/BeginnersGuide/Download

Python2 or Python3

Python 2.7 released in mid of 2010 and Python 3.x released in 2008. As Python 3.x is not a backward compatible, programs written in Python 2.x not working in Python 3.x. Most of the tools/ libraries still do not support Python 3.x. Hence, Python 2.x is widely used by the tech community. But no doubt, eventually Python 3.x come into the picture in a couple of years.

You can switch between different versions of python by using below commands:

alias python="/usr/bin/python3"

alias python="/usr/bin/python"

For more information: https://wiki.python.org/moin/Python2orPython3

Advantages of Python:

(1) Python is a high-level, open source and easy to use language.

(2) Python language is supported by the different operating system such as Unix/Linux (preloaded), Mac OS (preloaded), Windows, Embedded Systems, Mobile Platforms such as Android, iOS.

(3) Developer community widely used python for creating open source tools

(4) Rich set of libraries available to do the complicated task

(5) It is used in Rapid Prototyping and helps the development of things in a fast manner.

Click Here for Short Tutorial: Variable and Data Types in Python

Implementation of Python

  • Cpython: a reference implementation of "Python", written in C.
  • PyPy: python in RPython. It supports Python 2.7 and it is 5 times faster than the reference implementation.
  • JPython: python in Java (supports Python 2.7)
  • PythonNet: python for .Net (supports Python 2.6 up to Python 3.5)
  • IronPython: python in C#

First program in Python

I am using OS Ubuntu 16.04 for doing python programming. Just open Terminal, enter "python". Below example shows how to display text on the terminal by using print command.

Alternatively, you can create the program in the file with extension .py, give execute permission and run as mentioned below.

Subscribe us to receive more such articles updates in your email.

If you have any questions, feel free to ask in the comments section below. Nothing gives me greater joy than helping my readers!

Disclaimer: This tutorial is for educational purpose only. Individual is solely responsible for any illegal act.

You may also like...

1 Response

  1. Darrel says:

    Great article. I am experiencing some of these issues as well..

Leave a Reply

Your email address will not be published.