Stop at the First Marker
00:00 Let’s actually just have a quick look then on what happens if we run the code. And this will now run a bit further than what we need to. But we can see here that in our first couple of markers, they each have just three distinct characters.
00:16
And then once we get down here, we’ll have the four distinct markers, and then it actually keeps on being distinct markers all the way out. So here I just want to do an if
test, I guess, where I want to compare.
00:32
So let’s do this here. If the length of the set of candidates
is equal to the marker_length
, then we can stop at this stage.
00:50
So I’ll just use a break
, which means that I’ll jump out of the for
loop, and it should be candidate
not candidates
.
00:59
And then here at the end, I can just print out n
.
01:05
So if we do this now, we should have something that tells us 7
down here at the end, and then we still have this debug information here, but we can also remove that one.
Become a Member to join the conversation.