File size: 305 Bytes
f904c62
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
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]