Python - The new generation language
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, but not mandatoryReason for increasing popularity:
- 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
- Interpreted
- There are no separate compilation and execution steps like C and C++
- Directly run the program from source code
- Internally, Python converts the source code into an intermediate form called byte code 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 Independent
- 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
- It is open sourced with its code freely available and redistributable
- High-level Language
- In Python, no need to take care about low-level details such as managing the memory used by the program
- Simple
- Closer to English Language, thus easy to learn
- Embedded
- Python can be used within C/C++ program to give scripting capabilities for the program's users
- Robust
- Exceptional handling features
- Memory management techniques in built
- Rich library Support
- 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, Machine Learning, Data Analysis and many more.
- Besides the standard library, there are various other high quality libraries such as the Python Imaging Library which is an amazing simple image manipulation library.
Comparison with Java
- Python is dynamically typed, no need to declare anything. An assignment statement binds a name to an object, and the object can be of any type. No type casting required when using container objects whereas Java is statically typed, all variable names(along with their types) must be explicitly declared. Attempting to assign an object of the wrong type to a variable name triggers a type exception. Type casting is required when using container objects
- Concise Express much in limited words whereas Verbose contains more words
- Compact whereas Less compact
- Uses Indentation for structuring code whereas uses braces for structuring code
The classical Hello World program illustrating the relative verbosity of a Java program and Python program
Java Code
public class HelloWorld
{
public static void main (String[] args)
{
System.out.println("Hello, world!");
}
}
Python Code
print "Hello, world!"
print ("Hello, world!") # Python version 3
Similarity with Java
- Require some form of runtime on your system such as JVM/Python runtime
- Can probably be compiled to executable without the runtime
![]() |
| GUI Interpreter |
| Command line interpreter |
Currently, there are two versions available Python 2 & Python 3. Many beginners must be wondering with which version of Python they should start.. My answer to this question is usually something along the lines "Just go with the version that suits your needs for the project at hand"
Software making use of Python
- 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
- Python can also be used object detection
Current Applications of Python
- A number of Linux distributions use installers written in Python due to which we see ubiquity in Ubuntu
- Python has seen extensive use in the information security industry, including exploits development
- Raspberry Pi- single board computer use Python as its principal user-programming language
- Python is now being used in Game Development
Pros:
- Ease of use
- Multi-paradigm Approach
Cons:
- 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 this
Industrial Importance
Most of the companies are willing to invest their time and hire Python Programmers. So those having a knowledge of python may have more chances of impressing the interviewing panel. My advice would be to start learning and gradually excel in Python.
Please share if you like and provide your feedback on the comment section below. Thank you guys for your wonderful support.

Comments
Post a Comment