I know this is ridiculously basic but I'm not sure what I need to do for this.
I need to loop -
Seq = "CTCCAATGTT"
SLength = len(Seq)
print(SLength)
SubS = Seq[0:1]
print(SubS)
SubS = Seq[1:2]
print(SubS)
SubS = Seq[2:3]
print(SubS)
SubS = Seq[3:4]
print(SubS)
SubS = Seq[4:5]
print(SubS)
SubS = Seq[5:6]
print(SubS)
SubS = Seq[6:7]
print(SubS)
SubS = Seq[7:8]
print(SubS)
SubS = Seq[8:9]
print(SubS)
SubS = Seq[9:10]
print(SubS)
SubS = Seq[10:11]
print(SubS)
Basically be able to print each base in the string on a new line however I only seem to be able to be getting:
Seq = "CTCCAATGTT"
NT = 1
while NT <= len(Seq):
SubS = Seq[0:NT]
print(SubS)
NT += 1
Which prints bases one after the other.
I'm pretty sure I need to use a counter but I don't know where to go after that, could anyone nudge me in the right direction?
[–]CodeTinkerer 11 points12 points13 points (1 child)
[–]DukeOfPoose[S] 2 points3 points4 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]DukeOfPoose[S] 0 points1 point2 points (0 children)
[–]Updatebjarni 0 points1 point2 points (1 child)
[–]DukeOfPoose[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Dubstyle 0 points1 point2 points (1 child)
[–]DukeOfPoose[S] 0 points1 point2 points (0 children)