Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup,NavigableString
- def are_you_owo_enough(tag):
- return tag.string!=None
- f = open("/dev/stdin")
- soup = BeautifulSoup(f,'html.parser')
- for tag in soup.find_all(are_you_owo_enough):
- s = tag.string.replace("L","W").replace("l","w").replace("R","W").replace("r","w")
- tag.string.replace_with(s)
- print(soup)
- f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement