Features of Python
- It is a very simple and easy to learn programming language. Any person who has had no exposure to any programming language before can also easily get started off with Python.
- In Python, there are only 30 reserved keywords which are very less as compared to any other languages and makes it easier to remember.
- Being a freeware Python is totally free of cost and needs no license whatsoever.
- Python is also an Open Source software which means that we can contribute to making the language better or customize it accordingly.
- It is an HPL (High Level Programming Language) and thus is humanly understandable.
- Python is a platform independent language. Platform independence makes it available for running on any machine. This feature is also called WORA (Write Once Run Anywhere)
7. This language also possesses portability feature. Hence, it can be moved from one machine or platform to another without bringing about any changes to the program itself.
8. The most important feature of Python is that it is a Dynamically Typed Programming Language i.e. we are not expected to declare the data type while declaring the variable. It is done automatically by the machine.
9. It is both a Procedure Oriented and Object Oriented Language.
Example:
num= 20 def f2(): print(“Hello this is a program : ”,num) f2()
OUTPUT:
Hello this is a program : 20
Here in the above program we write a simple code to print a statement along with an int variable num. Writing such a program would not be possible in other programming languages like C++ and Java because we would then be required to declare a class to write any such piece of code. But with Python we have no such restrictions.
- Python programmes are interpreted i.e. we need not compile and run the program but only running the program is sufficient as the interpreter takes care about the compilation.
- Being extensible is another one of Python’s features. It gives us the flexibility of using codes from other languages in Python to improve the performance of the application.
- We can always embed Python program in any other language’s code.
- There are a vast number of in-built functions already present as a part of the API thus, it has an extensive library.
Example:
If we need to print a random number which contains digits from 0 to 9 we can use the randint function which is in-built.
print(randint(0,9))
Limitations:
Having talked about the advantages and features of Python over other languages we will now discuss about it’s limitations as compared to the other programming languages. A few are:-
- In terms of performance Python does not stand parallel to other programming languages as it is an integrated programming language.
- Python hasn’t been able to provide much contribution in the field of smart phone applications as compared to other languages.
These were the few features and limitations of Python which make it different in many ways from the other programming languages.