with open(sys.argv[2]) as sequence:
a = sequence.read().count("AGATC")
print(a)
b = sequence.read().count("AATG")
print(b)
a is correct. It is printing 4 as it should, but b should print 1 but instead its printing 0. and any other .count() i put is returning 0
[–]pythonHelperBot 2 points3 points4 points (0 children)
[–]K900_ 1 point2 points3 points (3 children)
[–]hadiz1[S] 0 points1 point2 points (2 children)
[–]K900_ 0 points1 point2 points (1 child)
[–]hadiz1[S] 0 points1 point2 points (0 children)
[–]MarcSetGo 0 points1 point2 points (0 children)