Skip to main content

1. Intro

Characteristics

  1. General purpose Interpreted
  2. Interactive
  3. Object oriented
  4. High level programming language
  5. Supports functional and structured programming methods
  6. Can be compiled to byte-code for building large applications
  7. Very high-level dynamic data types and supports dynamic type checking
  8. Supports automatic garbage collection
  9. Can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java
  10. Scripting language
  11. Source code available under GNU General Public License (GPL)
  12. 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

  1. Easy to learn
  2. Easy to read
  3. Easy to maintain
  4. A broad standard library
  5. Interactive mode
  6. Portable
  7. Extendable
  8. Databases
  9. GUI Programming
  10. 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