Skip to content

Tag Archives: Python-Quizzes-Functions

time.time() returns ________ (A) the current time (B) the current time in milliseconds (C) the current time in milliseconds since midnight (D) the current time… Read More
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)? (A) [3, 4, 5, 20, 5, 25, 1, 3]… Read More
What is the output of the following program : import re sentence = 'horses are fast' regex = re.compile('(?P<animal>\w+) (?P<verb>\w+) (?P<adjective>\w+)') matched = re.search(regex, sentence)… Read More
What is the output of the following segment : chr(ord('A')) (A) A (B) B (C) a (D) Error Answer: (A) Explanation: ord() function converts a… Read More
What is the output of the following code : L = ['a','b','c','d'] print("".join(L)) (A) Error (B) None (C) abcd (D) [‘a’,’b’,’c’,’d’] Answer: (C) Explanation: “”… Read More
What will be the output of the following code : print type(type(int)) (A) type ‘int’ (B) type ‘type’ (C) Error (D) 0 Answer: (B) Explanation:… Read More