Which of the following one is reentrant lock type?
Correct Answer: RLock
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 following code? import threading k = 10 x = 0 m = threading.Lock() def foo(): global x for i in xrange(k): with m: x += 1 def bar(): global x for i in xrange(k): with m: x -= 1 t1 = threading.Thread(target=foo) t2 = threading.Thread(target=bar) t1.start() t2.start() t1.join() t2.join() print x
What is the method to retrieve the list of all active thread objects?
Output of following code? d = lambda p: p * 2 t = lambda p: p * 3 x = 2 x = d(x) x = t(x) x = d(x) print x
Output of following code snippet? def f(x): return x % 2 != 0 and x % 3 != 0 result=filter(f, range(1, 20)) print result
Which will be the output of the below code snippet? def foo(x=[]): x.append(1) print(x) foo() foo() foo()
Read the following statements: >>> word = 'Help' + 'A' >>> word[:2] Which of the following will be the output of the above code?
Which statement would you use to import a module called 'foo'?
How many positional arguments can be passed to the below function def my_func(*args): pass
How is Python's code organized?
Given a X = 'a b c', what does X.split() return?
Python MCQs | Topic-wise