14 lines
439 B
Python
14 lines
439 B
Python
import json
|
|
|
|
with open('peiwenyunfu.json', 'r', encoding='utf-8') as f:
|
|
data = json.load(f)
|
|
|
|
for rhyme, r_data in data.items():
|
|
if rhyme in ["metadata", "preface"]:
|
|
continue
|
|
for word, content in r_data.get("词条", {}).items():
|
|
if word in ["紫殿東", "少微東", "東海東", "日夜東", "隔西東"]:
|
|
print(f"Word: {word}")
|
|
print(f"Content: {content}")
|
|
print("-" * 40)
|