PyDocs

Nav

Python Runtime Services

oct

builtins

function
  • oct(integer, /)
Return the octal representation of an integer.

>>> oct(342391)
'0o1234567'
1 Example
>>> oct(8)
'0o10'
>>> oct(-56)
'-0o70'
from the Python docs
See Also
No see-alsos for builtins/oct
0 Notes
No notes for oct