str function

Syntax

  • string str(value)

Parameters

  1. value—(float, bool, string, float[], bool[], string[])
    Value to convert.

Returns

String calculated from value.

Description

The str function converts value to the corresponding string value.

Related

Examples

str(1.69)
# result = "1.69"
str(1.69 - 69/100)
# result = "1"
str(001)
# result = "1"
str(true)
# result = "true"