Which of the following creates a pattern object? re.compile(str) re.create(str) re.regex(str) re.assemble(str) TRUE ANSWER : ? YOUR ANSWER : ?
To insert 5 to the third position in list1, we use which Python command? list1.add(3, 5) list1.insert(2, 5) list1.append(3, 5) list1.insert(3, 5) TRUE ANSWER : ? YOUR ANSWER : ?
Which module in Python supports regular expressions? re none of the mentioned pyregex regex TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following statements is true? The standard exceptions are automatically imported into Python programs All raised standard exceptions must be handled in Python If any exception is thrown in try block, else block is executed When there is a deviation from the rules of a programming language, a semantic error is thrown TRUE ANSWER : ? YOUR ANSWER : ?
What is the use of duck typing? More restriction on the type values that can be passed to a given method Less restriction on the type values that can be passed to a given method Makes the program code smaller No restriction on the type values that can be passed to a given method TRUE ANSWER : ? YOUR ANSWER : ?
When is the finally block executed? when there is no exception only if some condition that has been specified is satisfied always when there is an exception TRUE ANSWER : ? YOUR ANSWER : ?
What type of data is: a=[(1,1),(2,4),(3,9)]? Invalid type Array of tuples Tuples of lists List of tuples TRUE ANSWER : ? YOUR ANSWER : ?
What data type is the object below in Python? L = [1, 23, 'hello', 1] tuple list dictionary array TRUE ANSWER : ? YOUR ANSWER : ?
Correct way to draw a line in canvas tkinter line() canvas.create_line() None of the mentioned create_line(canvas) TRUE ANSWER : ? YOUR ANSWER : ?