I've been given this string and this index position and I'm trying to find the index position while skipping over the "D" characters.
s="MMMMMMMMDDDDDDDMMMMMMIIMMDDDDDDDDDDDMMMMMMM"
tr1 = 13
As of right now I have this code:
for x in range(tr1):
if s[x] == "D":
continue
else:
print (s[x], x+1)
I should be getting a position of 23