Python Multiple Inheritance

Python Multiple Inheritance: The property of acquiring all the properties and behaviors of the parent object by an object is termed as Python inheritance. Python facilitates inheritance of a derived class from more than one base class which is also called as multiple inheritance in Python. Example: class Employees():   def Name(self): print "Employee Name: … Read more

Python Multilevel Inheritance

Python Multilevel Inheritance: The property of acquiring all the properties and behaviors of the parent object by an object is termed as Python inheritance. Python facilitates inheritance of a derived class from its base class as well as inheritance of a derived class from another derived class. The inheritance of a derived class from another … Read more

Python Inheritance

Python Inheritance: Like Java and C++, Python is also based on OOPs Concept, i.e, Python is an object-oriented programming language which uses classes and objects for computations. The property of acquiring all the properties and behaviors of the parent object by an object is termed as inheritance in OOPs. This is a unique feature in … Read more

Python Constructors

Python Constructors: Python facilitates a special type of method, also called as Python Constructors, to initialize the instance members of the class and to verify enough object resources for executing any startup task. Types of Constructors: Parameterized Constructor Non- Parameterized Constructor Features of Python Constructors:  In Python, a Constructor begins with double underscore (_) and … Read more

Python Object Class

Python Object Class: Like Java and C++, Python is also based on OOPs Concept, i.e, Python is an object-oriented programming language which uses classes and objects for computations. Python Class: A collection of Objects is termed as Class in OOPs concept. Every class has its own unique and distinguishable attributes and methods. Syntax: class ClassName: … Read more

Python OOPs Concepts

Python OOPs Concepts: Like Java and C++, Python is also based on OOPs Concept, i.e, Python is an object-oriented programming language which uses classes and objects for computations. Advantages of Python being a Object Oriented Programming Language: Development and maintenance of Python codes is easier than the procedural programming. Python can easily solve the real … Read more

Python pass

Python Pass: Python Pass statement is used to pass by without the execution of current iteration in between the loop. Syntax: loop/conditions statements: statements pass Example: //pythonexample.py print "Extracting terms from word ALPHA_NUMERIC.CHARACTERS:" for x in "ALPHA_NUMERIC. CHARACTERS":   if x == ".": print "\n" continue   if x == "_": print "\n" continue   … Read more

Python continue

Python Continue: Python Continue statement is used to skip the execution of current iteration in between the loop. Continue statement breaks the continuity of the current iteration only, i.e, next iterations will not get affected because of Continue statement in current iteration. Syntax: loop/conditions statements: statements continue Example: //pythonexample.py print "Extracting terms from word ALPHA_NUMERIC:" … Read more

Python break

Python Break: Python break statement is used to break the execution of current loop in between the loop. Break statement breaks the continuity of the containing loop only, i.e, external loops will not get affected because of Break statement in inner loop. Syntax: loop/conditions statements: statements break Example: //pythonexample.py print "Extracting ALPHA from word ALPHANUMERIC:" … Read more

Python while loop

Python While Loop: Python While Loop is a loop statement which can be used in various forms to execute a block of code continuously as long as the condition of the loop is true, and stops only when the condition fails. These are: While Loop : While loop is used to execute a group of … Read more