string

string(any value) → string string
Converts a value to a string.
If the value is already a string, it is returned.
If the value is a number x, "x" is returned.
If the value is an array, a string of the form "[key1: value1, key2: value2, ...]" is returned.
If the value is a boolean, "true" or "false" is returned.
If the value is null, "null" is returned.

Converts a value value to a string.

Parameters
Return
Python

In Python, str() is the language's native conversion:

Examples

string(12345) // "12345" string([1, 2, 3]) // "[1, 2, 3]" string("hello") // "hello" string(2 > 1) // "true"

See also
Synonyms