Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.get("/about-questions/")
- async def about_questions():
- aboutQuestions = []
- with open("./screen_files/about_questions.json", 'r', encoding="utf-8-sig") as f:
- data = json.load(f)
- for i in data:
- iden = int(i)
- question = data[i]["question"]
- answer = data[i]["answer"]
- aboutQuestions.append([iden, question, answer])
- return { "aboutQuestions": aboutQuestions }
Advertisement
Add Comment
Please, Sign In to add comment