
Python open()
The open() function opens the file (if possible) and returns the corresponding file object. The syntax of open() is: 1. open() Parameters file – path-like object (representing a […]
The open() function opens the file (if possible) and returns the corresponding file object. The syntax of open() is: 1. open() Parameters file – path-like object (representing a […]
In this tutorial, we will learn about the Python ord() function with the help of examples. The ord() function returns an integer representing the Unicode character. Example […]
The oct() function takes an integer number and returns its octal representation. The syntax of oct() is: 1. oct() Parameters The oct() function takes a single parameter x. This parameter […]
The object() function returns a featureless object which is a base for all classes. The syntax of object() is: 1. object() Parameters The object() function doesn’t accept any parameters. […]
The memoryview() function returns a memory view object of the given argument. Before we get into what memory views are, we need to first understand […]
In this tutorial, we will learn about the Python next() function with the help of examples. The next() function returns the next item from the iterator. Example […]
The map() function applies a given function to each item of an iterable (list, tuple etc.) and returns a list of the results. The syntax […]
In this tutorial, we will learn about the Python min() function with the help of examples. The min() function returns the smallest item in an iterable. It […]
In this tutorial, we will learn about the Python max() function with the help of examples. The max() function returns the largest item in an iterable. It […]
In this tutorial, we will learn about the Python len() function with the help of examples. The len() function returns the number of items (length) in an […]
The locals() method updates and returns a dictionary of the current local symbol table. A symbol table is a data structure maintained by a compiler […]
In this tutorial, we will learn about the Python list() constructor with the help of examples. The list() constructor returns a list in Python. Example 1. list() […]
The Python iter() function returns an iterator for the given object. The iter() function creates an object which can be iterated one element at a time. These […]
The issubclass() function checks if the class argument (first argument) is a subclass of classinfo class (second argument). The syntax of issubclass() is: 1. issubclass() Parameters issubclass() takes […]
The int() method returns an integer object from any number or string. The syntax of int() method is: 1. int() Parameters int() method takes two arguments: x – Number […]
In this tutorial, we will learn about the Python isinstance() function with the help of examples. The isinstance() function checks if the object (first argument) is an […]
The id() function returns identity (unique integer) of an object. The syntax of id() is: 1. id() Parameters id() function takes a single parameter object. 2. Return Value from […]
In this tutorial, we will learn about the Python input() function with the help of examples. The input() method takes input from the user and returns it. […]
In this tutorial, we will learn about the Python hash() method with the help of examples. The hash() method returns the hash value of an object if […]
The hex() function converts an integer number to the corresponding hexadecimal string. The syntax of hex() is: 1. hex() Parameters hex() function takes a single argument. x – integer […]