Python – The new generation Language

29 Jun, 2022
Python designed by Guido van Rossum at CWI has become a widely used general-purpose, high-level programming language.
Prerequisites:
Knowledge of any programming language can be a plus.
Reason for increasing popularity
Emphasis on code readability, shorter codes, ease of writingProgrammers can express logical concepts in fewer lines of code in comparison to languages such as C++ or Java.Python supports multiple programming paradigms, like object-oriented, imperative and functional programming or procedural.There exists inbuilt functions for almost all of the frequently used concepts.Philosophy is “Simplicity is the best”.
Emphasis on code readability, shorter codes, ease of writing
Programmers can express logical concepts in fewer lines of code in comparison to languages such as C++ or Java.
Python supports multiple programming paradigms, like object-oriented, imperative and functional programming or procedural.
There exists inbuilt functions for almost all of the frequently used concepts.
Philosophy is “Simplicity is the best”.
LANGUAGE FEATURES
InterpretedThere are no separate compilation and execution steps like C and C++.Directly run the program from the source code.Internally, Python converts the source code into an intermediate form called bytecodes which is then translated into native language of specific computer to run it.No need to worry about linking and loading with libraries, etc.
There are no separate compilation and execution steps like C and C++.
Directly run the program from the source code.
Internally, Python converts the source code into an intermediate form called bytecodes which is then translated into native language of specific computer to run it.
No need to worry about linking and loading with libraries, etc.
Platform IndependentPython programs can be developed and executed on multiple operating system platforms.Python can be used on Linux, Windows, Macintosh, Solaris and many more.
Python programs can be developed and executed on multiple operating system platforms.
Python can be used on Linux, Windows, Macintosh, Solaris and many more.
Free and Open Source; Redistributable
High-level LanguageIn Python, no need to take care about low-level details such as managing the memory used by the program.
In Python, no need to take care about low-level details such as managing the memory used by the program.
SimpleCloser to English language;Easy to LearnMore emphasis on the solution to the problem rather than the syntax
Closer to English language;Easy to Learn
More emphasis on the solution to the problem rather than the syntax
EmbeddablePython can be used within C/C++ program to give scripting capabilities for the program’s users.
Python can be used within C/C++ program to give scripting capabilities for the program’s users.
Robust:Exceptional handling featuresMemory management techniques in built
Exceptional handling features
Memory management techniques in built
Rich Library SupportThe Python Standard Library is vary vast.Known as the “batteries included” philosophy of Python ;It can help do various things involving regular expressions, documentation generation, unit testing, threading, databases, web browsers, CGI, email, XML, HTML, WAV files, cryptography, GUI and many more.Besides the standard library, there are various other high-quality libraries such as the Python Imaging Library which is an amazingly simple image manipulation library.
The Python Standard Library is vary vast.
Known as the “batteries included” philosophy of Python ;It can help do various things involving regular expressions, documentation generation, unit testing, threading, databases, web browsers, CGI, email, XML, HTML, WAV files, cryptography, GUI and many more.
Besides the standard library, there are various other high-quality libraries such as the Python Imaging Library which is an amazingly simple image manipulation library.
Python vs JAVA
The classical Hello World program illustrating the relative verbosity of a Java Program and Python ProgramJava Code
public class HelloWorld{   public static void main (String[] args)   {      System.out.println("Hello, world!");   }}
Python Code
print("Hello, world!")
Similarity with Java
Require some form of runtime on your system (JVM/Python runtime)
Can probably be compiled to executables without the runtime (this is situational, none of them are designed to work this way)
LOOK and FEEL of the Python
GUI
Command Line interface
Softwares making use of Python
Python has been successfully embedded in a number of software products as a scripting language.
GNU Debugger uses Python as a pretty printer to show complex structures such as C++ containers.Python has also been used in artificial intelligencePython is often used for natural language processing tasks.
GNU Debugger uses Python as a pretty printer to show complex structures such as C++ containers.
Python has also been used in artificial intelligence
Python is often used for natural language processing tasks.
Current Applications of Python
A number of Linux distributions use installers written in Python example in Ubuntu we have the UbiquityPython has seen extensive use in the information security industry, including in exploit development.Raspberry Pi– single board computer uses Python as its principal user-programming language.Python is now being used Game Development areas also.
A number of Linux distributions use installers written in Python example in Ubuntu we have the Ubiquity
Python has seen extensive use in the information security industry, including in exploit development.
Raspberry Pi– single board computer uses Python as its principal user-programming language.
Python is now being used Game Development areas also.
Pros:
Ease of useMulti-paradigm Approach
Ease of use
Multi-paradigm Approach
Cons:
Slow speed of execution compared to C,C++Absence from mobile computing and browsersFor the C,C++ programmers switching to python can be irritating as the language requires proper indentation of code. Certain variable names commonly used like sum are functions in python. So C, C++ programmers have to look out for these.
Slow speed of execution compared to C,C++
Absence from mobile computing and browsers
For the C,C++ programmers switching to python can be irritating as the language requires proper indentation of code. Certain variable names commonly used like sum are functions in python. So C, C++ programmers have to look out for these.
Industrial Importance
Most of the companies are now looking for candidates who know about Python Programming. Those having the knowledge of python may have more chances of impressing the interviewing panel. So I would suggest that beginners should start learning python and excel in it.
GeeksforGeeks is very soon going to introduce programming in Python too.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Article By Mudit Maheshwari:
A 3rd-year B.Tech IT student from VIT University, Vellore having a keen interest in coding, learning about new technology, and developing software. Besides being passionate about coding, he also loves playing guitar and singing. Currently staying in Chennai. You can reach him at mudit94@gmail.com.
If you also wish to showcase your blog here,please see GBlog for guest blog writing on GeeksforGeeks.
 
sagar utekar
Python
School Programming
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.