# Built-in Methods

## Circular Dependencies in Python

In python, it is possible to import one module or class from inside another. A circular dependency is created when one module is imported from another(directly or indirectly). Circular dependencies cause recursion, leading to infinite looping, failures, tight coupling, and many other problems. The function call keeps on repeating and creates an infinite loop. When …

## Three ways of cubing a number in python

Cubing a number means multiplying a number three times, which returns some number. The new number is called the cube of the number multiplied three times. Cubing a number in python is one of the most straightforward tasks to perform using mathematical operators or a module of the python language. This post will cover the …

## Integer to Binary String in Python

Hello readers, in every programming language, we use different data types to do easy and complex operations. Data types are the building blocks of every programming language. The integer data type is one of them. In this article, we will learn how to convert an integer to a binary string in python. This conversion is …

## How to Format a Number to 2 Decimal Places in Python?

Decimal Places are in the float type datatype. Python Number datatypes store the numeric value. There are three numeric types in Python: int, float, complex. They are immutable. The int integer type is the number zero, a positive natural number, or a negative integer. A float type is a number, positive or negative, containing decimal …

## Map() vs Filter() Function in Python

Built-in functions are used to solve many complex problems easily. Let’s see the details of the map() vs filter() functions. Programming languages are used in solving very complex mathematical problems. We always need some functions to solve them. There are pre-defined functions available to solve this issue. These functions are referred to as built-in functions. …

## For Loop with Two Variables in Python

Python is a high-level, general-purpose programming language. Python was created by Guido van Rossum and was first released on February 20, 1991. It is a widely used and easy language to learn. It has simplified syntax, which gives more emphasis on natural language. You can quickly write and execute the code in Python faster than in other …

## Difference between ‘/’ and ‘//’ in Python division

Let’s try to understand the difference between the ‘/’ and the ‘//’ operators used for division in the Python. Before getting there first, let’s take a quick look into what is the need for a division operator. What is a division operator in Python? Python programming language provides various arithmetic operators. Arithmetic operators are operators …

## Mocking in Python Using Unittest.mock

Mocking in Python is referred to the process of replacing original objects in a Python code with substitute objects, which can be discarded later on. Mocking is usually used in Unit Tests and Testing in Python. It saves the Test Developer’s time and energy and can replicate different libraries in Python and their methods. The …

## Callback functions in Python – A Complete Overview

A callback is a general concept in Python as well as other languages like Javascript, C, etc. We know that Python is an object-oriented language and functions are first-class objects in Python. This means, in Python, we can assign the value returned by a function to a variable and return a function from another function. …

## What is the Python __slots__ function?

Hello readers, this article will help you to understand what __slots__, their advantages, disadvantages, and usage. What are __slots__? It is used in class and object implementation programs.  __slots__ is a class variable that is usually assigned a sequence of strings that are variable names used by instances. The primary goal of using __slots__ is for …