Built-in Functions Flashcards

(65 cards)

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
Returns the value of the specified attribute (property or method)
getattr()
26
Returns the current global symbol table as a dictionary
globals()
27
Returns True if the specified object has the specified attribute (property/method)
hasattr()
28
Returns the hash value of a specified object
hash()
29
Executes the built-in help system
help()
30
Converts a number into a hexadecimal value
hex()
31
Returns the id of an object
id()
32
Allowing user input
input()
33
Returns an integer number
int()
34
Returns True if a specified object is an instance of a specified object
isinstance()
35
Returns True if a specified class is a subclass of a specified object
issubclass()
36
Returns an iterator object
iter()
37
Returns the length of an object
len()
38
Returns a list
list()
39
Returns an updated dictionary of the current local symbol table
locals()
40
Returns the specified iterator with the specified function applied to each item
map()
41
Returns the largest item in an iterable
max()
42
Returns a memory view object
memoryview()
43
Returns the smallest item in an iterable
min()
44
Returns the next item in an iterable
next()
45
Returns a new object
object()
46
Converts a number into an octal
oct()
47
Opens a file and returns a file object
open()
48
Convert an integer representing the Unicode of the specified character
ord()
49
Returns the value of x to the power of y
pow()
50
Prints to the standard output device
print()
51
Gets, sets, deletes a property
property()
52
Returns a sequence of numbers, starting from 0 and increments by 1 (by default)
range()
53
Returns a readable version of an object
repr()
54
Returns a reversed iterator
reversed()
55
Rounds a numbers
round()
56
Returns a new set object
set()
57
Sets an attribute (property/method) of an object
setattr()
58
Returns a slice object
slice()
59
Returns a sorted list
sorted()
60
Returns a string object
str()
61
Sums the items of an iterator
sum()
62
returns a tuple
tuple()
63
returns the type of an object
type()
64
Returns the __dict__ property of an object
vars()
65
Returns an iterator, from two or more iterators
zip()