BOX8 | Find the output of the following code?
Question
digit = “12 34 98”
find_digit = r”d+”
print(re.findall(find_digit,digit))
solved
0
Machine Learning
55 years
3 Answers
870 views
Grand Master 0
Answers ( 3 )
[’12’, ’34’, ’98’]
I am getting a blank list as an output. What can be the issue?
this essentially extracts all the numbers from the string hence the output will be [’12’, ’34’, ’98’]