Built-in functions Flashcards

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
Q

getattr()

A

returns value of named attribute of an object

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

globals()

A

returns dictionary of current global symbol table

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

exec()

A

executes dynamically created program

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

hasattr()

A

returns whether object has named attribute

29
Q

help()

A

invokes the built in help system

30
Q

hex()

A

converts integer to hexadecimal

31
Q

hash()

A

returns hash value of an object

32
Q

input()

A

reads and returns a line of string

33
Q

id()

A

returns identify? of an object

34
Q

isinstance()

A

checks if a object is an instance of class

35
Q

int()

A

returns integer from number or string

36
Q

issubclass()

A

checks if object is subclass of a class

37
Q

iter()

A

returns iterator for an object

38
Q

list() Function

A

creates list in Python

39
Q

locals()

A

returns dictionary of current local symbol table

40
Q

len()

A

returns length of an object

41
Q

max()

A

returns largest element

42
Q

min()

A

returns smallest element

43
Q

map()

A

applies function and returns a list

44
Q

next()

A

retrueves next element from iterator

45
Q

memoryview()

A

returns memory view of an argument

46
Q

object()

A

creates a featureless object

47
Q

oct()

A

converts integer to octal

48
Q

ord()

A

returns unicode point for unicode character

49
Q

open()

A

returns a file object

50
Q

pow()

A

returns x to the power of y

51
Q

print()

A

prints the given object

52
Q

property()

A

returns a property attribute

53
Q

range()

A

return sequence of integers between start and stop

54
Q

repr()

A

returns printable representation of an object

55
Q

reversed()

A

returns reversed iterator of a sequence

56
Q

round()

A

rounds a floating point number to ndigits

57
Q

set()

A

returns a python set

58
Q

setattr()

A

sets value of an attribute of object

59
Q

slice()

A

creates a slice object specified by range()

60
Q

sorted()

A

returns sorted list from a given iterable

61
Q

str()

A

returns informal representation of an object

62
Q

sum()

A

adds items of an iterable

63
Q

tuple() Function

A

creates a tuple

64
Q

type()

A

returns type of an object

65
Q

vars()

A

returns __dict__ attribute of a class

66
Q

zip()

A

returns an iterator of Tuples

67
Q

__import__()

A

advanced function called by import

68
Q

super()

A

allow you to refer parent class by super