Skip to content

oct

const oct: (x: number) => string = builtins.oct

Defined in: packages/pythonlib/src/index.ts:175

Convert an integer to an octal string prefixed with “0o”.

Parameters

ParameterTypeDescription
xnumberThe integer to convert

Returns

string

Octal string (e.g., “0o17”)

See

Python oct()