ccpq/poc_hugo.py

26 lines
496 B
Python

#!/usr/bin/python3
import pathlib
import time
import os
import csv
import random
from collections import Counter
from rich.console import Console
from rich.markdown import Markdown
def _create_dictionnary():
with open(path) as file:
reader = csv.DictReader(file)
data = list(reader)
question = random.choice(data)
return question
if __name__ == "__main__":
path = "./data/list_book1.csv"
_create_dictionnary()
print(get_random_question())
print()