Which thread method is used to wait until it terminates?
AnswerWhat is the exception raised for an error that doesn’t fall in any of the categories?
AnswerWhat is the method to retrieve the list of all active threads?
AnswerWhat is the difference between a semaphore and bounded semaphore?
AnswerHow does global value mutation used for thread-safety?
AnswerWhat are the states/features supported by a RLock object?
AnswerWhich method is used to identify a thread?
AnswerWhich of the following statements best describes the behavior of the random.shuffle(mylist) as being used in the below code fragment?
import random mylist = [10, 20, 30] random.shuffle(mylist) print(mylist)Answer
Which of the following is the output of the below piece of code?
import random print(random.seed(3))Answer
Which of the following is the output of the below Python code snippet?
ints = set([1,1,2,3,3,3,4]) print(len(ints))Answer
Which of the following is the output of the instructions given below?
mylist=[1, 5, 9, int('0')] print(sum(mylist))Answer
Which of the following is the output of the below Python code?
mylist=['a', 'aa', 'aaa', 'b', 'bb', 'bbb'] print(mylist[:-1])Answer
Which of the following for loops would yield the below number pattern?
Note: Python 2.7
11111 22222 33333 44444 55555Answer
Which of the following is the output of the code given below?
mylist=['abc','cde','abcde','efg'] print(max(mylist))Answer
Which of the following is the output of the Python code fragment given below?
var1 = 4.5 var2 = 2 print(var1//var2)Answer
Which of the following is the output of the below Python code?
try: if '1' != 1: raise "firstError" else: print("firstError has not occured") except "firstError": print("firstError has occured")Answer
Which of the following is the output of the below Python code?
[Note: Python 2.7.5 and above]
mylist=['a', 'aa', 'aaa', 'b', 'bb', 'bbb'] print(mylist[int(-1/2)])Answer
Which of the following is the output of the below Python code?
var1 = lambda var: var * 2 ret = lambda var: var * 3 result = 2 result = var1(result) result = ret(result) result = var1(result) print(result)Answer
Which of the following is the output of the lines of code specified below?
x = 1 print(++++x)Answer
Which of the following correctly describes the output of the below Python code?
testArr = [11, 22, 33, 22, 11] result = testArr[0] for iter in testArr: if iter > result: result = iter print(result)Answer
© 2017 QuizBucket.org