Examveda

What will be the output of the following Python code?
re.sub('morning', 'evening', 'good morning')

A. 'good evening'

B. 'good'

C. 'morning'

D. 'evening'

Answer: Option A


This Question Belongs to Python Program >> Regular Expressions In Python

Join The Discussion

Related Questions on Regular Expressions in Python