len

Returns the length of the bytes value.

This function does not generate a change.

Function

bytes.len()

Arguments

None

Return value

Returns length of the byte sequence.

Example

This code uses len() to return the length of a byte sequence:

bytes("abc").len();

Return value in JSON format

3