I'm trying to understand why my snippet of code ends up with the class "list" as opposed to a Tuple.
The way I'd like it to work is to open a CSV, check for the user/password header and use those to append to a tuple so that I can retrieve accounts by doing accounts[1], accounts[2]
It's important that the list of accounts is immutable to me, so I'm trying to end up with the class tuple.
# our csv file name
filename = "resources/accounts.csv"
with open(filename) as infile:
reader = csv.DictReader(infile)
accounts = []
for row in reader:
accounts.append((row['user'],row['password']))
print(type(accounts))