You are here : python_3Built-in Functionsoct

oct() - Built-in Functions

Convert an integer number to an octal string.  The result is a valid Python
expression.  If x is not a Python int object, it has to define an
__index__() method that returns an integer.


Syntax

oct(x)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference