Built-in Functions



print(object = ‘’, end = "\n")
Print
object
to stdout followed by
end
.

input()
The function reads a line from input, converts it to a string (stripping a trailing newline), and returns that.

assert(expression, message = ‘’)
Raise AssertionError if
expression
evaluates to false.

exit(message = N)
Terminates the calling process. When
message
is specified it is printed to stderr.

sleep(secs)
Suspend execution of the calling thread for the given number of seconds. The argument may be a floating point number to indicate a more precise sleep time.

zip(iterable1, iterable2)
Aggregates elements from
iterable1
and
iterable2
.

all(iterable)
Return true (1B) if all elements of the
iterable
are true (or if the
iterable
is empty).

any(iterable)
Return true (1B) if any element of the
iterable
is true. If the
iterable
is empty, return false (0B).

multiloop(iterable1, iterable2 [,iterable3], function)
This function is roughly equivalent to the following code: {}

multiloop_filtered(iterable1, iterable2 [,iterable3], filter_function, function)
This function is roughly equivalent to the following code: {}

sum(iterable)
Sums the items of an
iterable
and returns the total.

product(iterable)
Multiplies the items of an
iterable
and returns the total.

sorted(iterable, key = N, reverse = 0B)
Return a new sorted array from the items in
iterable
.
key
specifies a function of one argument that is used to extract a comparison key from each element of
iterable
.
reverse
is a boolean value. If set to true (1B), then the elements of
iterable
are sorted as if each comparison were reversed.

min(arg1, arg2)
Return the smallest of two arguments.
min(iterable)
Return the smallest item of
iterable
.

max(arg1, arg2)
Return the largest of two arguments.
max(iterable)
Return the largest item of
iterable
.

hex(x)
Convert an integer number to an uppercase hexadecimal string.

bin(x)
Convert an integer number to a binary string.

rotl(value, shift)
Rotate the
value
left by
shift
bits.

rotr(value, shift)
Rotate the
value
right by
shift
bits.

Mathematical functions