Nested Lists in Python

Nested lists are Python representations of two dimensional arrays. They are used to represent lists of lists. For example, a list of grocery lists for the month or matrices we can

Slicing Python Strings

Python comes with a string slicing system, Slicing is nothing but fetching a piece from a pie. Square Bracket [] notation allows us to slice Python strings to get one

Send & Read E-Mail in Python

Generally, to send emails we use an SMTP server and to view emails we use IMAP servers. Python Provides In-built Modules to Send and Read emails, to send emails we

Requests Library in Python

Requests Library is used to make requests to the HTTP websites/API endpoints. Using requests library we can make a request to a URL, get information of a website such as

Abstraction and Encapsulation in OOPS – Python

Table of Contents Show / Hide 1. Abstraction in Python2. abstract method3. abstract class4. Important conclusions about abstract class and abstract method4.1. Interface Classes5. Encapsulation in Python6. Public Members7. Private

Indentation in Python

An indent in python is where the block of code belonging to a clause starts. An indent provides space or tab which also provides an increase in readability. All the

Operator Overloading in Python

Operator Overloading is making an operator perform some action other than an existing option. Python does support Operator Overloading. The main usage of Operator Overloading in Python is we can

Polymorphism in OOPS – Python

Polymorphism means the ability to represent an object in many forms using a single interface. Polymorphism is derived from two different words poly which means many, morphs means many forms.

Inheritance in OOPS – Python

Inheritance is an important concept in object-oriented programming. Inheritance means deriving a new class from an existing class. A class that inherits the properties is known as child class and

Classes and Constructors OOPS Concept – Python

OOP’s Concept is a programming concept that uses objects and classes in programming. OOP’s is all about objects and everything we create/write is an object. Objects provide a better and

File Handling in Python

Python provides file handling and supports users to read, write and perform many other operations on files. Python has an in-built function that can open a file and perform manipulations

Functions in Python

Functions are a group of statements that can be executed when we call them. We need to define these statements inside a single block such that whenever there is a

Exception handling Python

An Exception is an unwanted event that is caused during the execution of the program. This unwanted event that disturbs the normal flow of the program is called an exception.

Strings in Python

A sequence of elements typically characters, inside single or double quotes is called string. Even a single character inside the quotes is also called a string. Table of Contents Show

Loops in Python

A loop is a sequence of instructions that is continually repeated until a certain condition is reached. Typically a certain process is done, such as getting an item of data

Conditional Statements – If, else, elif in Python – [PythonWife]

All the programming languages execute code line by line, but in some cases, we might want to avoid executing few lines of code. This is where we use conditional statements.

Keywords in Python

Keywords are the reserved words in Python. We cannot use a keyword as a variable name, function name, or any other identifier. The following identifiers are used as reserved words,

Operators in Python

Python operators are the special symbols that carry out arithmetic or logical operations between two or more operands. These operands can be values or variables. There are various types of

Variables and Data types in Python

Table of Contents Show / Hide 1. Variables in Python1.0.1. Declaring and using a variable1.0.2. Variables are case-sensitive1.0.3. Assigning multiple values1.0.4. Re-declaring the variable1.0.5. Swapping two variables1.0.6. Type-Casting 1.0.7. Deleting a

Introduction to Python

Python is an easy-to-learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with