Q45
What will be the output of the following Python code? n = re.sub(r' +', 'Hello', 'Cats and dogs')
A.
Hello
Hello
Hello
Hello
Hello
B.
‘Hello Hello Hello’
AnswerC.
[‘Hello’, ‘Hello’, ‘Hello’]
D.
(‘Hello’, ‘Hello’, ‘Hello’)
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board