In Python, built-in exceptions can be inherited from. Which of the following is the base exception class?
Correct Answer: Exception
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Python Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Python MCQ Questions
Given a program that saved a text file in the directory '/temp_files', which of the following will make sure that '/temp_files' exists before writing the file?
Read the following statements: >>> lst = ['spam','and','eggs'] >>> lst[2] = 'toast' >>> print ''.join(lst) >>> print ' '.join(lst) Which of the following is the output of the second print statement in the above code snippet?
Read the following statements: >>> import string >>> s = 'mary\011had a little lamb' >>> print s Which of the following will be the output of the above code snippet?
Read the following statements: Statement 1: Many string module functions are now also available as string object methods. Statement 2: To use string object methods, there is no need to import the string module. Which of the following is correct?
What would the 'sorted_tel' be in the following code: tel = {'jack': 4098, 'sape': 5139, 'bill': 3678, 'mike': 2122} sorted_tel = sorted(tel.items(), key=lambda x: x[1])
Which code snippet can be used to get the multiples of 2 from the list a = [1, 2, 3, 4, 5, 6, 7, 8, 9] ?
What function is used to find the absolute path of a file?
What is the correct way to open the file 'test.txt' and append the text 'foo' to it?
Which function prints all of the current properties and values of any kind of object?
To make numbers be of a specific length, zeroes are padded to the left. Which of the following is the best way to pad a string with zeroes to the left, to make its length 5? The string is: num = '123'