Friday, June 17, 2011

Introduction to python

Python is an easy to learn and powerful programming language.In python code is automatically compiled to byte code and executed.So python can be used as a scripting language.

Features of python
  • Simple and Easy to Learn
  • Free and Open Source
  • High-level Language
  • Built-in high level data types: strings, lists, dictionaries.
  • The usual control structures: if, if-else, if-elif-else, while.
  • Multiple levels of organizational structure: functions, classes, modules, and packages.


Python programs are executed by interpreters. There are two modes to use the interpreter.
  • Interactive mode
  • Script mode
Indentation: In python white space indentation effect the meaning.A logical block will have the same indentation.If one of the line of a logical block has a different indentation it will result in syntax error.

Code is checked at runtime: Python does very little checking at compile time.Python only checks a line when it runs that line.