Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- f = open('input.txt', 'r')
- out = open('output.txt', 'w')
- amount_of_chars_in_line = int(f.readline())
- first_line = f.readline()
- first_line = first_line[:-1]
- second_line = f.readline()
- isComplementary = True
- for i in range(0, amount_of_chars_in_line):
- if (first_line[i] == 'A' and second_line[i] == 'T') or (first_line[i] == 'G' and second_line[i] == 'C') or \
- (first_line[i] == 'C' and second_line[i] == 'G') or (first_line[i] == 'T' and second_line[i] == 'A'):
- continue
- else:
- isComplementary = False
- break
- out.write('Yes') if isComplementary else out.write('No')
- out.close()
- f.close()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement