Python is an open source general-purpose object oriented programming language. It is a high level dynamic, interpreted language.
There are no type declarations of variables, parameters, functions, or methods in source code and thus makes the code short and flexible. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. It is easy to interface with various languages like C, C++, Java, etc.
Due to availability of Python interpreter for many Operating Systems (Linux, Mac, Windows), it runs on wide varieties of systems .
Guido van Rossum, a Dutch programmer is the main creator of Python and is central figure to decide the direction of Python.
What is Python used for?
It is a general purpose language, so it can be used for generally everything. Some of the areas where Python is extensively used are:
- Data Analysis
- Natural language processing
- Web and internet development
- Game development
- Web Scraping
- GUI development
- Writing Scripts
- It comes pre-installed with Linux and Mac OS X.
- For Windows, binaries can be downloaded and installed from Python official website.
Type python at the command line to start an interactive interface. To exit, type control-D.
Type python program_name to run program (Eg. >>> python filename.py)
To invoke the program through its name, make the *.py file executable and add the
following #!/usr/bin/env python to the top.
Getting Help in Python
» If you encounter problems using Python, you should first check the documentation. Documentation may be installed along with Python. You can also check online Python documentation which describes the language and the standard modules in detail.
» The help function will provide documentation for most Python functions in an interactive Python session.
» To view all available methods for an object, or all of the functions defined within a module, use the dir function.