oct(x)

Returns test


arraylistThe name of the array.

REMARKS
* No prefix required - Core
* Convert an integer number to an octal string prefixed with "0o". 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. For example:
* If you want to convert an integer number to an octal string either with the prefix "0o" or not, you can use either of the following ways.
* link to Excel

>>> oct(8) 
'0o10'
>>> oct(-56)
'-0o70'

>>> '%#o' % 10, '%o' % 10
('0o12', '12')
>>> format(10, '#o'), format(10, 'o')
('0o12', '12')
>>> f'{10:#o}', f'{10:o}'
('0o12', '12')

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top