Given a number
oct( returns a
string containing an octal (base 8) representation of
. Consistent with
Python's convention that any number starting with a zero is
considered octal, the result of this function will always have
a leading zero.
>>> oct(0) '0' >>> oct(127) '0177'
See also Section 9.4, “The string
.format() method”: octal
conversion is supported by specifying