ScanSkill

oct

This oct() function returns an integer converted into an octal string.

Syntax

oct(integer)

Here,

  • integer: Required. An integer value to be converted into an octal string.

Example

>>> oct(10)
'012'
>>> oct(256)
'0400'
>>> oct(4294967296L)
'040000000000L'