我正在尝试使用Django来对一些RNA序列进行染色。我使用枚举和zip函数在列表中查找相等的索引。例如:
for i, (a, b) in enumerate(zip(seq1, seq2)):
if a == b and i not in green:
<p style="color: green;">{{i}}</p>
elif a != b and i not in red:
<p style="color: red;">{{i}}</p>
我在模板中遇到了以下错误:
'for'语句应该使用格式'for x in y':for i, (a, b) in enumerate(zip(seq1, seq2)):
请注意以上代码中的格式问题。