Spaces:
Running
Running
import csv | |
def load_users(path): | |
""" | |
Reads a CSV with header 'users,passwords' | |
and returns a list of (user, password) tuples. | |
""" | |
with open(path, newline="", encoding="utf-8") as f: | |
reader = csv.DictReader(f) | |
return [(row["users"], row["passwords"]) for row in reader] |