Integer (int)

All integer numbers. See Numbers for more information.

Returned by

Integer objects are returned by the following functions and methods:

Integer methods

int.is_even()

Returns true if the number is even.

Signature

bool is_even()


int.is_odd()

Returns true if the number is odd

Signature

bool is_odd()


int.to_string()

Returns the value of the number as a string.

Signature

# Returns the value of the number as a string
str to_string(
  int [fill],   # Left fill the string with zeros until it reaches the length
)

Arguments

The method int.to_string() accepts the following positional arguments:

Name Type Description Tags
fill int

Left fill the string with zeros until it reaches the length specified by this argument. A leading negative sign counts towards the length, and is handled by inserting the padding after the - character rather than before. The original string is returned if the value provided is less than or equal to the former's length.

[optional]


The results of the search are