• python
  • Python class and objects : Python tutorial 24

    Python classes and objects : Python is a “object oriented” programming language. In simple words, classes are templates for the objects , and objects are collection of variables and functions. Defining classes in python : Class definition looks like : class ClassName : statements Similar to functions, class definitions should execute at first before running. […]

  • python
  • Python Exception : Python Tutorial 23

    Python Exception : What is an Exception : Exceptions are errors that raised during execution time. That means your statement is correct but during execution time , it was trying to run a statement that cannot be done . Let’s take an example on a python exception : for i in range(5,-1,-1): print 5/i Output […]

  • python
  • Python Module : Python tutorial 18

    Python Module : A python module is simply a python file ( .py file ) with definitions and statements. The file name is the module name. After creating a module, we can use it any other module using “import” command.  Module is useful for re-usability of the code. You can write one function in one […]