Python Programming  tutorial,Python Structure Of Program Example

Python 3 Tutorial

Python Structure Of Program

     A Python Program is constructed from Code Blocks. A block is a piece of python program text that is executed as a Unit. The following are code blocks

  • module
  • function body
  • class definition
  • script file
  • script command with -c option
  • module run as top level script(__main__) using -m option
  • eval and exec runs code blocks

A code block executed in an execution frame. A frame contains administrative information(for debugging) and determines where and how execution continues after the code block's execution has completed.