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
TheDataMonk 55 years 3 Answers 843 views Grand Master 0

Answers ( 3 )

  1. [’12’, ’34’, ’98’]

    Best answer
  2. I am getting a blank list as an output. What can be the issue?

  3. this essentially extracts all the numbers from the string hence the output will be [’12’, ’34’, ’98’]

Leave an answer

Browse
Browse