
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How to convert an integer to a octal string in Python?
We have use oct() function from Python’s library to convert any integer to its octal equivalent number. We get a string having octal representation
>>> oct(100) '0o144' >>> oct(0x10) '0o20' >>> oct(10) '0o12'
- Related Articles
- How to convert an integer to a hexadecimal string in Python?
- Convert decimal integer to octal in Java
- Java Program to convert integer to octal
- How to convert an integer to a character in Python?
- Java Program to convert decimal integer to octal number
- How to convert String to Integer and Integer to String in Java?
- Convert an integer to a hex string in C++
- How to convert an integer to a unicode character in Python?
- How to convert an integer to an ASCII value in Python?
- How to convert a string of any base to an integer in JavaScript?
- How to convert a string to a integer in C
- How to convert a string vector into an integer vector in R?
- Python – Convert Integer Matrix to String Matrix
- Java Program to convert int to Octal String
- How to convert an integer into a date object in Python?

Advertisements