Python Built-in Functions

Related Tags

Tutorials

Python range()

Python range type represents an immutable sequence of numbers. The most common use of a range is to use it for iterating over a series of items (list, set, tuple, dictionary or string). The range object is more memory efficient than list or tuple. A range stores only the start, stop and step values in …

Python print() Method

Python print() function prints the given string or object to the standard output. The standard output is the screen or to the text stream file. Example: Print an integer to Screen Program output. Syntax of print() Method The complete syntax of the print() function is: Method Parameters The print() method …

Python input()

The Python input() function allows user inputs in the programs. The input() function reads a line from the input, converts into a string and returns it as method return value. The input() function, optionally, allows a prompt String as the method argument that is displayed to user while taking the …

Python bin() Method

Python bin() method converts a given integer to it’s equivalent binary string. If the method parameter is some other object (not integer) then it has to __index__() method (with double underscores on the both sides) which must return an integer value for the object. The prefix 0b represents that a …

Python ascii() Method

Python ascii() method is language inbuilt function and returns a string containing a printable representation of an object. ascii() escapes the non-ASCII characters in the string using \x, \u or \U escapes. 1. Syntax The syntax of the ascii() method is: Here the object is required method argument and it …

Python all() Function

Python all() function returns True if all the elements of an iterable are True. If any element in the iterable is False, all() returns False. all() can be thought of as logical AND operation on elements on iterable. All values are True, all() returns True. All values are False, all() …

Python any() Function

Python any() function returns True if at least one element of an iterable is Truthy. If no element in iterable is True, any() returns False. any() can be thought of as logical OR operation on elements on iterable. All values are True, any() returns True. All values are False, any() …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.