ExamVeda
Login
Home
51
Which of the following functions returns a dictionary mapping group names to group numbers?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
52
What will be the output of the following Python code?
re.split('[a-c]', '0a3B6', re.I)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
53
What will be the output of the following Python code?
import re
s = 'abc123 xyz666 lmn-11 def77'
re.sub(r'\b([a-z]+)(\d+)', r'\2\1:', s)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
54
Which of the following statements regarding the output of the function re.match is incorrect?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
55
How can you replace a matched pattern with a new string using regular expressions in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
56
Which of the following pattern matching modifiers permits whitespace and comments inside the regular expression?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
57
How can you match zero or more occurrences of a pattern in regular expressions?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
58
What will be the output of the following Python code?
re.split(r'(n\d)=', 'n1=3.1, n2=5, n3=4.565')
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
59
Choose the option wherein the two choices do not refer to the same option.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
60
What will be the output of the following code:
import re
result = re.findall(r'd{1,3}', 'There are 25 apples and 300 oranges.')
print(result)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board