Examveda

What will be the output of the following Python code?
a=re.compile('[0-9]+')
a.findall('7 apples and 3 mangoes')

A. ['apples' 'and' 'mangoes']

B. (7, 4)

C. ['7', '4']

D. Error

Answer: Option C


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

Join The Discussion

Related Questions on Regular Expressions in Python