Skip to content

Tag Archives: Python-Functions

In this article, we will learn the differences between casefold() and lower() in Python. The string lower() is an in-built method in Python language. It… Read More
In Python, we can give another name of the function. For the existing function, we can give another name, which is nothing but function aliasing.… Read More
Python __repr__() is one of the magic methods that returns a printable representation of an object in Python that can be customized or predefined, i.e.… Read More
In this article, we will discuss the difference between normal def defined function and lambda in Python. Def keyword​​​​​​​ In python, def defined functions are… Read More
Python complex() function returns a complex number ( real + imaginary) example (5+2j) when real and imaginary parts are passed, or it also converts a… Read More
Python repr() Function returns a printable representation of an object in Python. Python repr() Function Syntax: Syntax: repr(object) object: The object whose printable representation is… Read More
Python delattr() Function is used to delete attributes from a class. It takes two arguments, the first one is the class object from which we… Read More
In this article, we will discuss how to use enumerate() and zip() functions in python. Python enumerate() is used to convert into a list of… Read More
Python list() function takes any iterable as a parameter and returns a list. In Python iterable is the object you can iterate over. Some examples… Read More
Python input() function is used to take user input. By default, it returns the user input in form of a string. input() Function  Syntax:  input(prompt)… Read More
Python staticmethod() function is used to convert a function to a static function. A static method is a method that belongs to a class rather… Read More
Python dict() Function is used to create a Python dictionary, a collection of key-value pairs. Python3 dict(One = "1", Two = "2") Output: {'One': '1',… Read More
Python remove() Function is a built-in method to remove elements from the set. remove() method takes exactly one argument. Syntax set.remove(element) If the element passed… Read More
Python intersection_update() method is used to update a set with common elements only of all the sets passed in parameter of intersection_update() method. Python set… Read More
Python def keyword is used to define a function, it is placed before a function name that is provided by the user to create a… Read More