Python References

TUTORIALS
COURSE
EXAMPLES
REFERENCES
COMPILER

Python reference

Python abs()

Returns the absolute value of a number

Python all()

Returns True if all elements in the iterable are true

Python any()

Returns True if any element in the iterable is true

Python ascii()

Returns a string containing a printable representation

Python bin()

Converts an integer to a binary string

Python bool()

Converts a value to a Boolean

Python chr()

Returns a string representing a character

Python dict()

Creates a dictionary

Python enumerate()

Returns an enumerate object

Python filter()

Constructs an iterator from elements that return true

Python float()

Returns a floating-point number from a number or string

Python format()

Formats a specified value

Python hash()

Returns the hash value of an object

Python input()

Allows user input

Python int()

Returns an integer object

Python len()

Returns the length of an object

Python list()

Creates a list in Python

Python map()

Applies a function and returns a list

Python max()

Returns the largest item

Python min()

Returns the smallest item

Python clear()

Removes all elements from the dictionary

Python copy()

Returns a shallow copy of the dictionary

Python fromkeys()

Creates a new dictionary with keys from seq and value

Python get()

Returns the value for the given key

Python items()

Returns a view object of dictionary's (key, value) pairs

Python keys()

Returns a view object of dictionary keys

Python pop()

Removes and returns an element with given key

Python popitem()

Removes and returns arbitrary (key, value) pair

Python setdefault()

Inserts key with value if key not in dictionary

Python update()

Updates dictionary with key/value pairs

Python values()

Returns a view object of dictionary values

Python append()

Adds an element at the end of the list

Python clear()

Removes all elements from the list

Python copy()

Returns a shallow copy of the list

Python count()

Returns the count of specified element

Python extend()

Adds elements of a list to another list

Python index()

Returns the index of the first matched element

Python insert()

Inserts an element at the specified position

Python pop()

Removes and returns the element at given position

Python remove()

Removes the first item with the specified value

Python reverse()

Reverses the order of the list

Python sort()

Sorts the elements of a list

Python add()

Adds an element to the set

Python clear()

Removes all elements from the set

Python copy()

Returns a shallow copy of the set

Python difference()

Returns the difference of two or more sets

Python difference_update()

Removes all elements of another set from this set

Python discard()

Removes an element if it is a member

Python intersection()

Returns the intersection of two sets

Python intersection_update()

Updates the set with the intersection

Python isdisjoint()

Returns True if two sets have a null intersection

Python issubset()

Returns True if another set contains this set

Python issuperset()

Returns True if this set contains another set

Python pop()

Removes and returns an arbitrary set element

Python remove()

Removes an element from the set

Python symmetric_difference()

Returns the symmetric difference of two sets

Python symmetric_difference_update()

Updates a set with the symmetric difference

Python union()

Returns the union of sets

Python update()

Updates the set with the union

Python capitalize()

Converts the first character to uppercase

Python casefold()

Converts string into lower case

Python center()

Returns a centered string

Python count()

Returns the number of times a value occurs

Python encode()

Returns an encoded version of the string

Python endswith()

Returns true if the string ends with the value

Python expandtabs()

Sets the tab size of the string

Python find()

Searches for a value and returns its position

Python format()

Formats specified values in a string

Python index()

Searches for a value and returns its position

Python isalnum()

Returns True if all characters are alphanumeric

Python isalpha()

Returns True if all characters are alphabetic

Python isdecimal()

Returns True if all characters are decimals

Python isdigit()

Returns True if all characters are digits

Python islower()

Returns True if all characters are lower case

Python isnumeric()

Returns True if all characters are numeric

Python isspace()

Returns True if all characters are whitespaces

Python istitle()

Returns True if the string follows title case

Python isupper()

Returns True if all characters are upper case

Python join()

Joins the elements of an iterable to the string

Python count()

Returns the number of times a value occurs

Python index()

Searches for a value and returns its position