Introduction to Python
What is Python?
Python is a popular programming language that was created by Guido van Rossum, and released in 1991. It is a high level language i.e. it uses natural language elemnts that are easier to use.
Python is an interpreted language i.e. most of it's implementations execute the instructions directly and freely, without previosly compiling the program into machine language instruction. It employs object oriented approach.You can access the operating system at lower level with the use of python, if you want
Although Python is an interpred language, still it employs a compilation stage that translates the raw-text python script into a series of bytecodes which are then executed by Python virtuak machine. This process helps to imperove the performance of python and makes it much faster than pure interpreterslike BASIC but slower than truly compiled languages like C.
Before going further let us firstly know that how Python was named? It is very interesting to know that that the name of Python was taken from a coedy group named Monty Python, which is best known for the talents of Eric Idle, John Cleese, Terry Jones, Terry Gillium, Michael Palin and Graham Chapman.
It is used for:
- web development (server-side),
- software development,
- system scripting.
What can Python do?
- Python can be used on a server to create web applications.
- Python can be used alongside software to create workflows.
- Python can connect to database systems. It can also read and modify files.
- Python can be used to handle big data and perform complex mathematics.
- Python can be used for rapid prototyping, or for production-ready software development.
- Python can work on different platforms (Windows, Mac, Linux, Raspberry Pi,etc).
- Python has a simple syntax similar to the English language.
- Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
- Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
- Python can be treated in a procedural way, an object-orientated way or a functional way.
- Python is free like many other programming languages
- Python is potable i.e. it is supported on a large number of operating system platforms. it comes in ready compiled mformat for Windows OS and MacOS and includes the Tk extensionsso you can develop user intefaces.
- Python is powerful as there is very litle that you cannot do with python. As python can be extended using C,C++ and even Java iin certain circumstances, you can develop any type of program.
- Python is extensible as it is written in C and some extension in C++ and as you can access the souce code you can write extensions to the language. Many of the standard modules of python are supported by c or C++ interface.
- Python is easy, once you understand the basic concepts of python it becomes very eay to learn the rest. The core of the language is very small and the style and sementics are bvery simple.
Python Syntax compared to other programming languages
- Python was designed for readability, and has some similarities to the English language with influence from mathematics.
- Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
- Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and classes. Other programming languages often use curly-brackets for this purpose.
For what Python is good for
- Mathematics- Python uses NumPy extension that provides inteface to many standard mathematics libraries.
- Text Processing- Python can separate, split, summarize and report on any data as it comes with the modules that saparate out a log file line.
- Rapid Application Development- with the help of python you can develop any application very rapidly as it comes with extensive module library that provides direct interfaces to many of the protocols, tools, and libraries that you would have to develop otherwise.
- Cross platform development- If you want an application to deploy oacross a network that uses different platforms than in that case you can use Python to develop such an application.
- System Utilities- Although Python hides the low level parts of the operating system but you can access to the that with the use of tools and extensions of Python.
- Internet Programming- You can communicate over the network sockets with the use of Python at athe basic level as well as at the protocol level. If you want to read e-mail from a POP sever then there are modules available in Python that enables you to do that.
- Database Programming- There are no external modules or extensions required in python as it has a strong text and data handling capability. So, you can use it to interface between database and to act as a better report and summary tool than many of the interfaces that comes with the database system themselves.
- Everything else- It can be used for anything, there are no limits to what the language can do.