Python Built-in Functions Flashcards

1
Q

abs()

A

Returns the absolute value of a number

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

all()

A

Returns True if all items in an iterable object are true

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

any()

A

Returns True if any item in an iterable object is true

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

ascii()

A

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

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

bin()

A

Returns the binary version of a number

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

bool()

A

Returns the boolean value of the specified object

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

bytearray()

A

Returns an array of bytes

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

bytes()

A

Returns a bytes object

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

callable()

A

Returns True if the specified object is callable, otherwise False

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

chr()

A

Returns a character from the specified Unicode code.

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

classmethod()

A

Converts a method into a class method

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

compile()

A

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

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

complex()

A

Returns a complex number

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

delattr()

A

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

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

dict()

A

Returns a dictionary (Array)

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

dir()

A

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

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

divmod()

A

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

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

enumerate()

A

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

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

eval()

A

Evaluates and executes an expression

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

exec()

A

Executes the specified code (or object)

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

filter()

A

Use a filter function to exclude items in an iterable object

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

float()

A

Returns a floating point number

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

format()

A

Formats a specified value

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

frozenset()

A

Returns a frozenset object

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