Python Tutorials: Features of Python

Here is some key feature of Python language.

  • Supports both Procedure Oriented & Object Oriented Programming features.
  • Dynamically typed: variable type defined automatically by the assigned value.
  • Minimalistic, Pseudocode natural language
  • Python is interpreted language
  • Python is interpreted language, when you runPython program an interpreter will parse Python program line by line basis, but in compiled languages like C or C++, where compiler first compiles the program and then start running.

    An interpreted language is the little bit slow in comparison to the compiled language. When you are solving your business problems by using compiled language then you need to create own data structure to encapsulate data in the program, but in case of Python we no need to worry about the data structure and all because Python has everything to get you started.

    All libraries available at  https://pypi.python.org/

  • Extensible:
    • Import modules from other languages into Python
    • Embed Python code in other languages
  • Two variations:
    • IDLE (GUI)
    • python (command line)
  • Python is strongly Typed

In Python data type automatically conversion is not possible similar to other scripting language like JavaScript and PHP.

Example: Java script

2+”1” is

= ‘12’

Here 2 is automatically converted into string when we concatenate with string 1.

But in Python it will give error.

  • Write less code

In comparison to Java, we need to write 1/3 or 1/5 code in Python because maximum function are available in Python libraries.

Example: Read file

with open(“file.txt”) as tf:

print(tf.read())

Python is Dynamically Typed

  • Python is Dynamically Typed

In python we don’t define data types for any variable. Python automatically identified the data types for that variable according to assign value.

tempVar = “test”

above is string type.

tempVar = 1

above type is int.

  • We can perform lot of works by using Python language

Example:

  • Game Development.
  • GUI application.
  • Create Web sites.
  • Data Analysis.
  • System Administration Task.
  • Web Applications
  • Scrape data from a website.

Leave a Reply

Your email address will not be published. Required fields are marked *