
Python Dictionary clear()
The clear() method removes all items from the dictionary. The syntax of clear() is: 1. clear() Parameters clear() method doesn’t take any parameters. 2. Return Value from clear() […]
The clear() method removes all items from the dictionary. The syntax of clear() is: 1. clear() Parameters clear() method doesn’t take any parameters. 2. Return Value from clear() […]
In this tutorial, we will learn about the Python super() function with the help of examples. The super() builtin returns a proxy object (temporary object of the […]
The __import__() is a function that is called by the import statement. The syntax of the __import__() function is: 1. __import__() Parameters name – the name of the […]
In this tutorial, we will learn about the Python zip() function with the help of examples. The zip() function takes iterables (can be zero or more), aggregates […]
The vars() function returns the __dict__ attribute of the given object. The syntax of the vars() function is: 1. vars() Parameters vars() takes a maximum of one parameter. […]
In this tutorial, we will learn about the Python type() function with the help of examples. The type() function either returns the type of the object or […]
The tuple() builtin can be used to create tuples in Python. In Python, a tuple is an immutable sequence type. One of the ways of […]
In this tutorial, we will learn about the Python sum() method with the help of examples. The sum() function adds the items of an iterable and returns […]
The str() function returns the string version of the given object. The syntax of str() is: 1. str() Parameters The str()method takes three parameters: object – The object whose string representation […]
In this tutorial, we will learn about the Python sorted() method with the help of examples. The sorted() function sorts the elements of a given iterable in […]
In this tutorial, we will learn about the Python slice() function with the help of examples. The slice() function returns a slice object that is used to […]
In this tutorial, we will learn about the Python setattr() function with the help of examples. The setattr() function sets the value of the attribute of an […]
In this tutorial, we will learn about the Python set() function with the help of examples. The set() function creates a set in Python. Example 1. set() […]
In this tutorial, we will learn about the Python round() function with the help of examples. The round() function returns a floating-point number rounded to the specified […]
The reversed() function returns the reversed iterator of the given sequence. The syntax of reversed() is: 1. reversed() Parameters The reversed() function takes a single parameter: seq – the sequence […]
In this tutorial, we will learn about the Python repr() function with the help of examples. The repr() function returns a printable representation of the given object. […]
In this tutorial, we will learn about the Python range() method with the help of examples. The range() method returns an immutable sequence of numbers between the […]
The property() construct returns the property attribute. The syntax of property() is: Recommended Reading: Python @property: How to Use it and Why? 1. property() Parameters The property() takes four optional […]
In this tutorial, we will learn about the Python print() function with the help of examples. The print() function prints the given object to the standard output […]
The pow() function returns the power of a number. The syntax of pow() is: 1. pow() Parameters The pow() function takes three parameters: x – a number, the base y – […]