Which of the following methods returns the ASCII value of a character in Python?
Correct Answer: ord
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
Output of the following code: name = 'Jon' name.rjust(4, 'A')
What is a metaclass in Python?
Correct way to call the private method, myPrivateMethod(), in class MyClass, using dir(obj)? class MyClass: def __myPrivateMethod(self): print dir(obj)
Output of the following code? def foo(param1, *param2): print param1 print param2 def bar(param1, **param2): print param1 print param2 foo(1,2,3,4,5) bar(1,a=2,b=3)
Which is the correct way to execute a program from inside Python without having to consider how the arguments/quotes are formatted?
Read the following statements in which nested filters are used: shortline = lambda line: len(line) < 25 short_regvals = filter(shortline, (isRegDBVal, lines)) Which of the following errors is present in the above code?
Which module can be used for profiling Python code?
Consider the following code: myString = ' Hello! ' Which of the following choices will remove the spaces at the beginning and end of myString?
While running an application, a user pressed the interrupt key (Ctrl + C). Which of the following exceptions will occur?
What is the output of the following code? class A(object): def __init__(self): print 'Constructor A was called' class B(A): def __init__(self): print "Constructor B was called" class C(B): def __init__(self): super(C,self).__init__() print 'Constructor C was called' class D(C): def __init__(self): super(D,self).__init__() print 'Constructor D was called' d = D()