Thursday, May 2, 2024

BCA PART B 2. Demonstrate usage of advance regular expression

 


import re
t="A fat cat doesn't eat oat but a rat eats bats."
mo = re.findall("[force]at", t)
print(mo)

No comments:

Post a Comment