so I basically finished the code but the problem is I can't access the first line of the csv file. What I did was this
with open(sys.argv[1], newline='') as database:
reader = csv.reader(database)
col = len(next(reader)) # get number of columns
reader = list(reader)
row = len(reader)
So whenever I want to access a specific block, I do reader[0][0]. The problem is reader[0][0] comes out as the name of the first person. For example, I wanted to access the "AGATC" which logically I would do reader0 but it would access 15 instead. the [0] is the second line. I want it to access that first line so that I can know what are the boundaries of the program(like is the database the large one or the small one) or even if the person uses a different csv file with different STR's. Without the access, I had to do is make count the columns of the csv file. This is very inefficient. I would like to know is there a way to fix this or is there anything else I can do. I am new to python so it's a bit hard for me. Thank you in advance!
if col == 9:
array = [agatc, ttttttct, aatg, tctag, gata, tatc, gaaa, tctg]
else:
array = [agatc, aatg, tatc]