core.builtin

Source code: core/builtin.seq

class core.builtin.min[T]

Magic methods:

__init__(a: T, b: T)
__init__(a: T, b: T, c: T)
__init__(a: T, b: T, c: T, d: T)
__init__(a: T, b: T, c: T, d: T, e: T)
__init__(a: generator[T])
class core.builtin.max[T]

Magic methods:

__init__(a: T, b: T)
__init__(a: T, b: T, c: T)
__init__(a: T, b: T, c: T, d: T)
__init__(a: T, b: T, c: T, d: T, e: T)
__init__(a: generator[T])
core.builtin.min2(a, b)
core.builtin.max2(a, b)
core.builtin.len(x)

Return the length of x

core.builtin.iter(x)

Return an iterator for the given object

core.builtin.copy(x)

Return a copy of x

core.builtin.abs(x)

Return the absolute value of x

core.builtin.hash(x)

Returns hashed value only for immutable objects

core.builtin.ord(s: str)

Return an integer representing the Unicode code point of s

core.builtin.chr(i: int)

Return a string representing a character whose Unicode code point is an integer

core.builtin.next[T](g: generator[T], default: optional[T] = None)

Return the next item from g

core.builtin.any(x)

Returns True if any item in x is true, False otherwise

core.builtin.all(x)

Returns True when all elements in x are true, False otherwise

core.builtin.zip(a, b)

Returns a zip object, which is an iterator of tuples that aggregates elements based on the iterables passed

core.builtin.filter(f, x)

Returns all a from the iterable x that are filtered by f

core.builtin.map(f, x)

Applies a function on all a in x and returns map object

core.builtin.enumerate(x, start: int = 0)

Creates a tuple containing a count (from start which defaults to 0) and the values obtained from iterating over x

core.builtin.echo(x)

Print and return argument

core.builtin.reversed(x)

Return an iterator that accesses x in the reverse order

core.builtin.round(x, n)

Return the x rounded off to the given n digits after the decimal point.

core.builtin.sum(xi)

Return the sum of the items added together from xi

core.builtin.repr(x)

Return the string representation of x