I have a list of sequences (for simplicity like the following one)
seqList=["ACCTGCCSSSTTTCCT","ACCTGCCFFFTTTCCT"]
and I want to use for looping to replace every instance of a nucleotide other than ["A","C","G","T"] with "N"
my code so far
seqList=["ACCTGCCSSSTTTCCT","ACCTGCCFFFTTTCCT"]
for x in range(len(seqList)):
for i in range(len(seqList[x])):
if seqList[x][i] not in ["A","C","G","T"]:
seqList[x][i].replace(seqList[x][i],"N")
print(seqList)
problem is, the nucleotides are not replaced and nothing changes in the original sequence and i can't figure out the reason!!!