Python if-elif-else statements – with example

Python if-elif-else statements Conditional statements like Python if-elif-else are an essential part of decision-making in any programming language. In Python, conditional statements allow us to evaluate various conditions and execute…

Python Logical Operators – with example

Python Logical Operators Logical operators are used to performing various logical operations in programming. Python logical operators also allow you to check various conditions using multiple conditional operators. There are…

Python Comparison Operators – with example

What are the Python comparison operators used for? Comparison operators also known as relational operators are used to comparing values of two operands. Depending on the condition being tested, comparison…

HTML How to change fonts – CSS font-family

HTML How to change fonts - sample code The font-family property defines which font to display for a given HTML element. <h1 style="font-family:verdana;">This is a heading</h1> <p style="font-family:courier;">And this is…

Python absolute value – with example

Python absolute value – basics An absolute value of a number describes the distance from zero that a number is on the number line. It can also be defined as…

Python concatenate string – with example

Python concatenate strings – basics Strings in Python are an array of bytes representing Unicode characters. In Python, strings are surrounded by double or single quotation marks. Unlike other programming…

How to use Python queue – with example

What is the Python queue data structure used for? Python queue is a linear abstract data structure that follows the first in-first out (FIFO) approach. This means that the first…

How to use Python Decorators – with example

What is a Python decorator? Python decorators allow us to change the behaviour of a function without permanently making changes to the syntax of that function. This simply means that…

Python Assert Keyword – with 3 examples

What is the Python assert keyword used for The assert keyword is a built-in statement that is generally used for testing and debugging. Using this keyword we can test whether…

How to use classes in Python – with example

How to use classes in Python? Python is an object-oriented programming language. Therefore, unlike procedure-oriented languages,  python makes heavy use of classes and objects.  A class in Python is often…

How to use Python PIP – with example

How to use Python pip? What is it good for? Pip – the Package Installer for Python – is a package manager that is used to install and manage software…

How to debug in Python – with example

How to debug in Python using PDB Debugging is a very important aspect of writing programs that every developer should master. The built-in module PDB is an interactive source code…