What is a Python Language, Features With Example ?

What is a Python Language, Feature Of Python Programming With Full Example ?, why python is widely used by data scientists, python open source project


What is a python language feature
Linuxmath.blogspot.com
Python Language 

Characterization of a python programming Language:

Python is a  oops  "Object-Oriented Programming Language" supporting language, it is based on C Programming language that is supported many of C language features as well as objects oriented features, " Example: class, method, object, inheritance, polymorphism, and encapsulation, Abstraction can't be achieved directly in python there are some other techniques to achieve abstraction in python".

Always remind that python doesn't support full object-oriented features, it is supported only some functionality of oops, that's why python manipulation and computation power is less than full object-oriented programming like, " Java, VB .Net, C#, etc". Python interpreter compiles the code line by line or does one line execution at a single time then moves another line for execution. It is working the same as C Language  Compiler,  that's why python takes more execution time as compared to fully supporting object-oriented languages. But after all, python has been so much popular because of its huge Libraries and Python Community.

Python is also widely used for Data Science domains :

Many programmers like to use Python Language for Data Science Domains like Data Analysis,  Business Analytics, Data Engineering, Data PreProcessing, Machine learning, AI, etc. There are a lot of python scientific-supported libraries like matplotlib, pandas, TensorFlow,  NumPy, scipy, ski kit, seaborne, etc. Python is the most popular language at present, it is easy to understand and readable like the English language.

Python Released Versions and Latest Updation :

Python language supported two main versions each version has further different release versions, python 2. x and python 3. x  "x can be 0 to 1". Python 3.9 is released latest in 2020, and 2.9 is is the version of 2. x. Both the versions support the same python code, but python 3.9 has more Updation and supported Libraries. The latest project and scientific research are going on python 3.9 version with the latest Libraries support. 

Explanation of Python object oriented programming feature: 

Basically python support many oops feature 

* Class

* Inheritance 

* Polymorphism 

* Constructor 

* Object 

* Method / Function 

* Encapsulation 

Abstraction can be performed in python but It is something different as in java and other full object-oriented languages, we will see later how could perform Abstraction in Python. 


* Class :

 In a simple definition Class is a blueprint of data or object. If we understand it very deeply so we can find that class is like a wrapper or a Capsule where the whole codes, method, data types are stored. And we can easily access this functionality from one class to another class by using the concept of Inheritance,  inheritance is a very popular feature of oops, we will discuss it later. So python language gives us a class keyword to define or initialize the classes, python also supports the nested class feature which means it works similarly to nested for loop function, like first the main class than the other sub class than another. 


* Polymorphism :

Polymorphism means one method with different parameters that means one method can we access through different parameters, like in the first call we only pass the two-parameter, then at another call we pass the four different parameters and so on. Polymorphism increases the reusability of code.


* Encapsulation :

Encapsulation can be archived through the functions or class. Encapsulation means binding the data into the limitations, the method is the best example of encapsulation because many data types and codes can be bound through the method and it will accessible anywhere from the program. 

* Object  :

Every class must have an object for performing operations through the object call. The class have consist lot of data type variables, methods, or functions as well as constructors,  they all are useless if the object of a class is not initialized if we create a class with thousands of lines of codes that are useless and cannot be accessible and do not take any space in memory.  But if we initialize the object of a class it will create a space on the memory and consume the memory, there is no matter how much the code long or short, if there is create an object once so it will take space definitely.  We can access the class members and instances through the object and if we have defined any constructors on the program it will activate as soon as the object is created. So in simple words, the object is a medium to call the instances of the class. 

Note: Instances means, data type variable,  methods or function,  constructor, etc. Which is defined within the class. 

* Constructor  :

The constructor of the python language is working differently from other languages,  python constructor defines by the "def" keyword with "__init__" method declarations. It seems complex because python-support the constructor but its implementation is a little bit tricky,  so we need to focus here to understand this concept. Basically, we all already know that the constructor is automatically initialized when the object of the class is created, the same thing is to happen with python. The two key "self and init" is much more notable here because the constructor initializes and wakeup depending on these two keywords. 

* Inheritance  :

Inheritance is a more useful feature of an object-oriented language, it provides the reusability of code through inheriting some functionality by its parent class. Inheritance is five types in others languages like " single inheritance,  multiple inheritances,  multi-level inheritance, hierarchical inheritance, hybrid inheritance. We need to focus only on three inheritance in python which is more usable,  "multiple inheritance,  multi-level inheritance, and single inheritance.


That all are the Definition of python Language. I will upload all the hands-on Examples of these oops features very soon using the latest Libraries, I'm already working on that, sometime later you will find the Updation of this page and subscribe to this blog for the latest information.

You may also read this: )

 
 
 
 
 

About the author

D Shwari
I'm a professor at National University's Department of Computer Science. My main streams are data science and data analysis. Project management for many computer science-related sectors. Next working project on Al with deep Learning.....

Post a Comment