Saraswat World
Python Datetime Module Python Datetime Module in Python provides us the different features to work with dates as date object by importing theย datetimeย module. Current Date Python code to import the…
WHAT IS DATETIME MODULE IN PYTHON?
PYTHON POLYMORPHISM Polymorphism is one of the OOP(object-oriented programming) concepts. Polymorphism in Python is the ability of an object to take many forms. The word โpolymorphismโ means โmany…
WHAT IS POLYMORPHISM IN PYTHON?
PYTHON MODULE Module is a file or library of codes or set of methods, that can be included in our Application. HOW TO CREATE A MODULE? Creating Module- Module can be created by saving the code in a file…
WHAT IS A PYTHON MODULE?
PYTHON ITERATORS An Iterator is an object that contains a countable no. of values or elements that can be traversed. An iterator allows a programmer to traverse through all the elements of a collection…
WHAT IS PYTHON ITERATOR?
PYTHON INHERITANCE Inheritance is a mechanism of object-oriented programming for deriving new classes (sub classes) from existing ones such as super class or base class. It allows us to define a class…
WHAT IS PYTHON INHERITANCE?
PYTHON CONSTRUCTOR- A constructor is a special type of method or function that is used to initialize the instance members of the class. Constructor definition is automatically executed when we create…
WHAT IS PYTHON CONSTRUCTOR?
DEFINITION OF PYTHON CLASS AND OBJECT Python Class The Class is a logical entity that has some attributes and methods, in other words, we can also say that the class is like an object constructor or a…
WHAT IS A CLASS AND OBJECT IN PYTHON?
Definition of Python Lambda Functions Lambda Functions are anonymous or unnamed short functions. Syntax of Lambda Functions in Python lambda arguments: expression Examples of Python Lambda Functions…
WHAT ARE LAMBDA FUNCTIONS IN PYTHON?
WHAT IS A FUNCTION IN PYTHON? A function is a named sequence of statements or a block of code that only runs when it is called by its name. We can pass data, known as parameters, into a function. On calling…
HOW TO USE FUNCTIONS IN PYTHON?
A For loop is used to execute a set of statements, once for each item in a list, tuple, set, dictionary, string, or any iterable object, etc. As shown in below example it will print each fruit available…
HOW TO USE FOR LOOPS IN PYTHON?