Python 3 codes for loops
In my python script, there are 7 rows (0 to 6) in a list of lists (alignments). The SeqIDs of the first 2 rows, the next 2 rows and the last 3 rows are similar. Now, while appending the rows using the following codes
uniques = 
ap = open(tempparse, ‘w’)
for row in range(len(alignments)):
for compare in range(row+1,len(alignments)): ...... ...... .......
the last row (i. e. the last one of the last 3 rows in the list ) is not appended because it does not have any subsequent row to compare, and therefore, the six rows are appended except for the last one.
How can I resolve this issue?