1. Intro
Characteristics
- General purpose Interpreted
- Interactive
- Object oriented
- High level programming language
- Supports functional and structured programming methods
- Can be compiled to byte-code for building large applications
- Very high-level dynamic data types and supports dynamic type checking
- Supports automatic garbage collection
- Can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java
- Scripting language
- Source code available under GNU General Public License (GPL)
- Dynamically typed language (means that the type (class) of a variable is only known when the code runs)
Created by Guido van Rossum in 1985-1990
Features
- Easy to learn
- Easy to read
- Easy to maintain
- A broad standard library
- Interactive mode
- Portable
- Extendable
- Databases
- GUI Programming
- Scalable
Facts
In Python, integer precision is limited only to the constraints of your hardware, Python is well-capable of interpreting literally millions (and even billions) of bits of precision.
import sys
sys.maxsize
sys.float_info
Python autopromotes from int to long int if the value is large
Running
python test.py
Creating executable
chmod +x test.py
./test.py
Like
- Positional and Keyword Arguments in a function
- Concise (not verbose)
- Grow with the programmer
- List Comprehensions
- Default values for arguments in functions