Built-in functions Flashcards

(68 cards)

1
Q

abs()

A

returns absolute value of a number

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

any()

A

Checks if any Element of an Iterable is True

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

all()

A

Return true when all elements in iterable is true

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

ascii()

A

Returns string containing printable representation

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

bin()

A

converts integer to binary string

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

bool()

A

converts a value to Boolean

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

bytearray()

A

return array of given byte size

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

callable()

A

checks if the object is callable

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

bytes()

A

return immutable bytes object

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

chr()

A

returns a character(a string) from an integer

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

compile()

A

return a python code object

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

classmethod()

A

returns class method for given function

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

complex()

A

creates a complex number

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

delattr()

A

deletes attribute from the object

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

dict()

A

creates a dictionary

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

dir()

A

tries to return attributes of object

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

divmod()

A

returns a tuple of quotient and remainder

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

enumerate()

A

return an enumerate object

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

staticmethod()

A

creates static method from a function

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

filter()

A

constructs iterator from elements which are true

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

eval()

A

runs python code within program

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

float()

A

returns floating point number from number, string

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

format()

A

returns formatted representation of a value

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

frozenset()

A

returns immutable frozenset object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
getattr()
returns value of named attribute of an object
26
globals()
returns dictionary of current global symbol table
27
exec()
executes dynamically created program
28
hasattr()
returns whether object has named attribute
29
help()
invokes the built in help system
30
hex()
converts integer to hexadecimal
31
hash()
returns hash value of an object
32
input()
reads and returns a line of string
33
id()
returns identify? of an object
34
isinstance()
checks if a object is an instance of class
35
int()
returns integer from number or string
36
issubclass()
checks if object is subclass of a class
37
iter()
returns iterator for an object
38
list() Function
creates list in Python
39
locals()
returns dictionary of current local symbol table
40
len()
returns length of an object
41
max()
returns largest element
42
min()
returns smallest element
43
map()
applies function and returns a list
44
next()
retrueves next element from iterator
45
memoryview()
returns memory view of an argument
46
object()
creates a featureless object
47
oct()
converts integer to octal
48
ord()
returns unicode point for unicode character
49
open()
returns a file object
50
pow()
returns x to the power of y
51
print()
prints the given object
52
property()
returns a property attribute
53
range()
return sequence of integers between start and stop
54
repr()
returns printable representation of an object
55
reversed()
returns reversed iterator of a sequence
56
round()
rounds a floating point number to ndigits
57
set()
returns a python set
58
setattr()
sets value of an attribute of object
59
slice()
creates a slice object specified by range()
60
sorted()
returns sorted list from a given iterable
61
str()
returns informal representation of an object
62
sum()
adds items of an iterable
63
tuple() Function
creates a tuple
64
type()
returns type of an object
65
vars()
returns __dict__ attribute of a class
66
zip()
returns an iterator of Tuples
67
__import__()
advanced function called by import
68
super()
allow you to refer parent class by super