Booklet

author

Hack University

IT & Software

24 Python Built-In Functions

24 PYTHON BUILT-IN FUNCTIONS

all()

Returns True if all items in an iterable object are true.

ascii()

Replaces non-ascii characters with escape character.

bin()

Returns the binary version of a number.

bool()

Returns the boolean value of the specified object.

chr()

Returns a character from the specified Unicode code.

compile()

Returns the specified source as an object, ready to be executed.

dict()

Returns a dictionary.

eval()

Evaluates and executes an expression.

exec()

Executes the specified code.

float()

Returns a floating point number.

getattr()

Returns the value of the specified attribute.

globals()

Returns the current global symbol table as a dictionary.

hex()

Converts a number into a hexadecimal number.

input()

Allows user input.

int()

Returns an integer number.

len()

Returns the length of an object.

locals()

Returns an updated dictionary of the current local symbol table.

memoryview()

Returns a memory view object.

next()

Returns the next item in an iterable.

oct()

Converts a number into an octal.

print()

Prints to the standard output device.

round()

Rounds a number.

str()

Returns a string object.

type()

Returns the type of an object.

More booklets by Hack University

More IT & Software booklets

Your recently viewed booklets

  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
  • booklet-slide-images
See all booklets