Python is a fully object-oriented programming language but it can also be used for scripting. It is assumed that you are already familiar with object-orientation concepts and have experience writing object-oriented code in another language. This page will show how to write object-oriented code in Python without explaining object-oriented concepts.
The following class computes the area of a rectangle. Classes are defined with class keyword. init is the constructor. length and width are initialized in the constructor. Area is calculated by calcArea().