pow

The pow function returns the number included as the first argument, x, raised to the number included as the second argument, y. If a third argument, z, is added, the previous result is returned modulo z, an operation more efficient than

pow(x, y) % z

Submitted by admin on Sun, 01/20/2019 - 15:55

oct

The oct function converts an integer to its octal representation in text and lowercase format, preceded by the characters "0o" (a zero followed by the letter o).

Submitted by admin on Sun, 01/20/2019 - 15:12

list

The list function allows us to create a list of objects. The elements will be those included in the iterable passed as an argument, and will retain the same order as in this one. The iterable can be a sequence, a container that supports iteration, or an iterator object. If the iterable is already a list, an independent copy of it is returned.

The items in the list can be of different types.

Submitted by admin on Sun, 01/20/2019 - 15:04

len

The len function returns the length (the number of elements) of an object. The argument can be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).

Submitted by admin on Sun, 01/20/2019 - 14:55

int

The int function returns an integer from a number or a string, or returns the value 0 if no argument is included.

If the argument is not a number or if a base is added as second argument, the first argument must be of type text, bytes or bytearray, representing an integer in the specified base. Optionally, the text could be preceded by the + or - signs (no spaces between the sign and the text are allowed). The text can include spaces at the beginning or at the end.

Submitted by admin on Sun, 01/20/2019 - 14:04

hex

The hex function converts an integer to its hexadecimal representation in text and lowercase format, preceded by the characters "0x".

Submitted by admin on Sun, 01/20/2019 - 13:55

float

The float function returns a real number from a number or a text string.

If the argument is a text string, it should contain the decimal point (though not required, see example below), optionally preceded by a sign. If no argument is added, the function returns the real number 0.0. The argument can also be a text string representing a "nan" (not a number) or a positive or negative infinity. More exactly, the argument must comply with the following grammar after removing whitespaces at the beginning and end of the string:

Submitted by admin on Sun, 01/20/2019 - 13:25