0

I have a data that looks like this

data ="
john is 23 years old 
luca is 25 years old  
Samia is 25 years old 
"

I want to search for john and print the 23 years old

print(re.findall('john',data2))

this return john but I want to print 23 years old

0 Answers0