I currently have
seq1 = "--MFA"
seq2= "--MFU"
for i in range(0, len(seq1)):
if seq1[i] or seq2[i] == '-':
print "hi"
else:
print "bye"
Why does it print "hi" 5 times (even if seq1[i] and seq1[i] are M, F, A/U). I thought it was a regex problem at first, but even escaping the hyphen yielded the same results.
'-' or '2' >>> '-''-' or '2' == '-' >>> '-'So you can guess that it always return the left part because it's interpreted as True.