ExamVeda
Login
Home
41
In the functions re.search.start(group) and re.search.end(group), if the argument groups not specified, it defaults to . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
42
What is a character class in regular expressions?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
43
What will be the output of the following Python code?
re.split(r'(a)(t)', 'Maths is a difficult subject')
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
44
What will be the output of the following code:
import re
pattern = re.compile(r'b[A-Z]+b')
result = pattern.findall('Hello, WORLD!')
print(result)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following Python code?
n = re.sub(r'\w+', 'Hello', 'Cats and dogs')
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
46
What is the purpose of the re.sub() function in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
47
What is the purpose of the re.MULTILINE flag in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
48
The difference between the functions re.sub and re.subn is that re.sub returns a . . . . . . . . whereas re.subn returns a . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
49
What will be the output of the following Python code?
re.split('mum', 'mumbai*', 1)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
50
The special character B matches the empty string, but only when it is . . . . . . . .
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board