Report Bug
Qus : _____ function convert an integer to octal string in python.
Qusपायथन में ______ फंक्शन एक इंटीजर को ऑक्टल स्ट्रिंग में परिवर्तित करता है।

A. unichr (x)
B. oct (x)
C. chr(x)
D. None of the these


Solution
B. oct (x)



Explanation

In Python, you can use the oct() built-in function to convert an integer to its octal representation as a string. Here's an example:


# Convert an integer to octal string
integer_value = 10
octal_string = oct(integer_value)
print(octal_string)



Report Bug