Built-in Functions Flashcards

1
Q

Returns the absolute value of a number

A

abs()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Returns True if all items in an iterable object are true

A

all()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Returns True if any item in an iterable object is true

A

any()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Returns a readable version of an object. Replaces none-ascii characters with escape character

A

ascii()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Returns the binary version of a number

A

bin()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Returns the boolean value of the specified object

A

bool()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Returns an array of bytes

A

bytearray()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Returns a bytes object

A

bytes()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Returns True if the specified object is callable, otherwise False

A

callable()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Returns a character from the specified Unicode code.

A

chr()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Converts a method into a class method

A

classmethod()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

compile()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Returns a complex number

A

complex()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Deletes the specified attribute (property or method) from the specified object

A

delattr()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Returns a dictionary (Array)

A

dict()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Returns a list of the specified object’s properties and methods

A

dir()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Returns the quotient and the remainder when argument1 is divided by argument2

A

divmod()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Takes a collection (e.g. a tuple) and returns it as an enumerate object

A

enumerate()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Evaluates and executes an expression

A

eval()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Executes the specified code (or object)

A

exec()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Use a filter function to exclude items in an iterable object

A

filter()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Returns a floating point number

A

float()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Formats a specified value

A

format()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Returns a frozenset object

A

frozenset()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Returns the value of the specified attribute (property or method)

A

getattr()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Returns the current global symbol table as a dictionary

A

globals()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Returns True if the specified object has the specified attribute (property/method)

A

hasattr()

28
Q

Returns the hash value of a specified object

A

hash()

29
Q

Executes the built-in help system

A

help()

30
Q

Converts a number into a hexadecimal value

A

hex()

31
Q

Returns the id of an object

A

id()

32
Q

Allowing user input

A

input()

33
Q

Returns an integer number

A

int()

34
Q

Returns True if a specified object is an instance of a specified object

A

isinstance()

35
Q

Returns True if a specified class is a subclass of a specified object

A

issubclass()

36
Q

Returns an iterator object

A

iter()

37
Q

Returns the length of an object

A

len()

38
Q

Returns a list

A

list()

39
Q

Returns an updated dictionary of the current local symbol table

A

locals()

40
Q

Returns the specified iterator with the specified function applied to each item

A

map()

41
Q

Returns the largest item in an iterable

A

max()

42
Q

Returns a memory view object

A

memoryview()

43
Q

Returns the smallest item in an iterable

A

min()

44
Q

Returns the next item in an iterable

A

next()

45
Q

Returns a new object

A

object()

46
Q

Converts a number into an octal

A

oct()

47
Q

Opens a file and returns a file object

A

open()

48
Q

Convert an integer representing the Unicode of the specified character

A

ord()

49
Q

Returns the value of x to the power of y

A

pow()

50
Q

Prints to the standard output device

A

print()

51
Q

Gets, sets, deletes a property

A

property()

52
Q

Returns a sequence of numbers, starting from 0 and increments by 1 (by default)

A

range()

53
Q

Returns a readable version of an object

A

repr()

54
Q

Returns a reversed iterator

A

reversed()

55
Q

Rounds a numbers

A

round()

56
Q

Returns a new set object

A

set()

57
Q

Sets an attribute (property/method) of an object

A

setattr()

58
Q

Returns a slice object

A

slice()

59
Q

Returns a sorted list

A

sorted()

60
Q

Returns a string object

A

str()

61
Q

Sums the items of an iterator

A

sum()

62
Q

returns a tuple

A

tuple()

63
Q

returns the type of an object

A

type()

64
Q

Returns the __dict__ property of an object

A

vars()

65
Q

Returns an iterator, from two or more iterators

A

zip()