News: SMF - Just Installed!

Author Topic: PYTHON TUTORIAL : 1 - Introduction to Python | What is Python?  (Read 339 times)


  • Administrator
  • Newbie
  • *****
  • Posts: 23
    • View Profile
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during 1985- 1990. Like Perl, Python source code is also available under the GNU General Public License (GPL). Python?s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python Web site,, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation. It has interfaces to many OS system calls and libraries and is extensible to C or C++. It has simple easy-to-use syntax, making it the perfect language for someone trying to learn computer programming for the first time. The syntax of the language is clean and length of the code is relatively short. It's fun to work in Python because it allows you to think about the problem rather than focusing on the syntax. Python is widely used in Artificial Intelligence, Natural Language Generation, Neural Networks and other advanced fields of Computer Science. Python had deep focus on code readability. Many large companies use the Python programming language include NASA, Google, YouTube, Mozilla etc.

There are two major Python versions -

    Python 2
    Python 3

Python 2 and 3 are quite different.

For example, one difference between Python 2 and 3 is the print statement. In Python 2, the "print" statement is not a function, and therefore it is invoked without parentheses. However, in Python 3, it is a function and must be invoked with parentheses.

In this Website and in the tutorial, we use Python 3+ because it more semantically correct and supports new features.

4 Reasons to Choose Python as First Language

    Simple Elegant Syntax
    Programming in Python is fun. It's easier to understand and write Python code. Why? The syntax feels natural. Take this source code for an example:

    a = 2
    b = 3
    sum = a + b

    Even if you have never programmed before, you can easily guess that this program adds two numbers and prints it.
    Not overly strict
    You don't need to define the type of a variable in Python. Also, it's not necessary to add semicolon at the end of the statement.
    Python enforces you to follow good practices (like proper indentation). These small things can make learning much easier for beginners.
    Expressiveness of the language
    Python allows you to write programs having greater functionality with fewer lines of code. Here's a link to the source code of Tic-tac-toe game with a graphical interface and a smart computer opponent in less than 500 lines of code. This is just an example. You will be amazed how much you can do with Python once you learn the basics.
    Great Community and Support
    Python has a large supporting community. There are numerous active forums online which can be handy if you are stuck. Some of them are:
       1. Learn Python subreddit
       2. Google Forum for Python
       3. Python Questions - Stack Overflow
       4. Python Forum (official)
       5. Our Discussion Section

(The Topic in the main site)