Python - Coding Terms/Commands Flashcards
Return the absolute value of a number. The argument may be an integer or a floating point number. If the argument is a complex number, its magnitude is returned.
abs(x)
Return True if all elements of the iterable are true (or if the iterable is empty).
all(iterable)
Return True if any element of the iterable is true. If the iterable is empty, return False.
any(iterable)
allows to loop over something and have an automatic counter.
enumerate(iterable, start=0)
allows user to input.
.input([prompt])
a string method and returns a string in which the elements of sequence have been joined by str separator.
.join() function
Return the lowest valued number.
min()
Return the highest valued number.
max()
return a random integer n such that a<= n <= b.
random.randint(a,b)
generates a sequences of numbers in the form of a list.
.range()
break a large string down into smaller strings.
.split()
method inserts the specified value at the specified position.
.insert()
returns a list of dict’s (key, value) tuple pairs
.items()
method appends an element to the end of the list
.append()
an inbuilt function in Python that removes and returns last value from the list or the given index value
.pop()