Question #841

What is the output of the code snippet below?
oct(7)
oct("7")

The function oct() is used to convert its argument into octal form. This function does not accept strings. The second function results in an error while the output of the first function is 0o7 . (programiz.com/python-programming/methods/built-in/oct)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵