Loops For Sequence Output - Python
I've been struggling to figure out a way to get my sequence printed out with a 6-mer in the sequence on separate lines. As so (note the spacing of each line): atgctagtcatc tgctag
Solution 1:
This should work:
width = 6for i in range(len(sequence) - width):
print" " * i + sequence[i:i+width]
Post a Comment for "Loops For Sequence Output - Python"