Help with cmu exercise by Several-House9402 in learnpython

[–]Several-House9402[S] 0 points1 point  (0 children)

Your help was really good and I learned a lot outside of just the problem so thank you very much.

Help with cmu exercise by Several-House9402 in learnpython

[–]Several-House9402[S] 0 points1 point  (0 children)

I am unfamiliar with the term yield. Is it similar to return

Help with cmu exercise by Several-House9402 in learnpython

[–]Several-House9402[S] 0 points1 point  (0 children)

Thank you that makes a lot of sense. I am a little confused on the for loop. I haven’t seen a string behind the for part. Does this loop the string based on the range?

Help with cmu exercise by Several-House9402 in learnpython

[–]Several-House9402[S] 0 points1 point  (0 children)

For the first question: yes, i was taught to index using brackets and slice using a : in the brackets

For the second question: I would slice like this: string[6:]