Now that we have If-statements and loops, the problems that we are going to tackle are going to get more complicated. Our function bodies are going to get longer as well, and are going to need some English explanation. Here is the up_to_vowel function from the While Loop lecture. We have added two comments. A comment begins with a number sign character. Often called the hash character. And goes until the end of the line. Python ignores these characters. Their purpose is to document code, much like doc strings document functions. The first one describes the variables that are used in this function. Notice how it links together before a vowel s and i. Let's explore a little bit about what that means. we'll do that using the word zymurgy with indices zero,one,two,three,four,five, and six. Well, we know that second index is not included in my sub-string, so that means that this is s starting an index zero going up to index seven. What is s from zero up through index six? That is zymurg. And it's from zero to five is zymur. S from zero to four is zymu. S from zero to three is zym. S from zero to two is zy. S from zero to one is z. And here's the fun bit s from zero to zero, just following this pattern of reducing the length by one gives me just the empty string. Well, we start before vowel off at the empty string and I starts off at zero. So if we plug zero in [INAUDIBLE] I, we end up at from, with a S from zero to zero, that's this. And S from zero through zero is the empty string, so indeed, before vowel contains all the characters found in S from zero through zero and before vowel is the empty string. This simple initialization, where we assign an empty string to before value and we assign zero to i. Establishes that this description here is correct. Furthermore, the first time through the loop we're going to add s at index zero to before vowel and replace what we had. Well now before vowel contains a Z. I was zero, so i plus 1 is 1, will make i 1. Now we're on that row when i is 1. And indeed this description still is true. The next time through the loop we look at S at index one, coming up here that's the y. We take the y and we tack it on to the end of before vowel, and then we increment i. I is now two, so S, from zero through two is indeed what we have saved inside before vowel. Maintaining this sort of relationship between variables is a bit of a tricky business, but it really helps to understand what's going on inside this loop. Coming up with these relationships in the first place is also challenging but with practice you'll get better and better. Whenever you write a loop there's going to be a relationship between your variables. Try and figure out what that relationship is and you'll have an easier time writing your loop body. Also, once you figure out that relationship, write it down. Put it in a comment so that you don't have to figure it out again the next time you read the code. This second comment, accumulate the non-vowels at the beginning of the string, describes what the loop does, much like doc strings don't say how functions work. This comment does not say how this loop gets the job done. It just describes the effect. Comments are intended for programmers and so they don't need to describe how the loop does its job. You should try and comment complicated bits of code to explain. The purpose of it. And you should also write comments to describe relationships between your variables.