Generation

generate functionWed, 03 May 2023

read a html file and Extract all of the japanese kannji hiragana katagana

from bs4 import BeautifulSoup def read_html(file): with open(file) as f: soup = BeautifulSoup(f, 'lxml') return soup.find_all(class_='jp') read_html('japanese.html')

Questions about programming?Chat with your personal AI assistant