What test case does this code fail? (Code Coach Security)
G should be between T and $ everytime a string with these characters and x's is entered. There could be many Gs but only one T and one $. V1 works and V2 doesn't. I found one case where it failed (reversed, T doesn't count? dunno. T$xx...G was the one that failed) So I changed lo.index('T') with (lo+x). index('T') and thus got rid of the error. SoloLearn says it still fails in the third case, so I put the other code back, but I am wondering what the problem is. Could you give me some ideas? I need to be better at input analysis. It's like 75% of the whole thing, I feel. But I also feel I am running the risk of mindless practice when I rush through the homework at my low level so I'll try to revisit the harder ones at times to make them better if I can. Did you construct maps, flow charts etc when you were a beginner? Any tips for at least a-not-stupid way of studying? Thanks in advance. https://code.sololearn.com/cwWZvs1SkG8m/?ref=app https://code.sololearn.com/cGM5jeaEVcGB/?ref=app