 Now, in Exercise 2, we're going to do just a little bit more coding work. It is possible that this is the first time that you have seen or written a generator. In which case, I hope it was a good chance to play with that and to get a sense of how that worked. The example in the instructions before the exercise was intended to give you a template to work from. We can look at how we applied this in our code. We'll use Sublime again and what I consider to be a pretty visually attractive tool for seeing the differences between two branches, Sublimerge, and it lets us see on the left the solution that we had to Exercise 1 and compare it to on the right the solution that we wrote for Exercise 2. Here we can see, if you look way on the right, you can just see a tiny bird's-eye view of the whole code and you can see down at the bottom, the new part is outlined in white. On the left you can see this white bar along the edge that shows where there was new code introduced in the change, where it was missing from the previous version. Sublimerge is a tool that you have to pay for. I believe it's about $30. Sublime itself is a tool that you can do a free trial of, but you also can pay for it. I think it's around $80. Altogether this is not a free solution. It's actually not even the tool that I use when I'm developing myself, but it is something that shows a little bit better in a video in my opinion, so I feel like it's good for this, but don't feel like you need to spend money on it if it's not for you. In a couple of lectures ago, I listed some diff tools, some things that are more than adequate, and if you find them useful, then free solutions are absolutely the way to go. Looking at the code here, you can see within the function that we already wrote, we add two new functions, we create them, Training Set and Evaluation Set. As we mentioned in the instructions, these are special. These are generators. The thing that makes them generators is they have this yield statement that they end with rather than a return statement. Generators are special because it has the yield here. Python does some fancy footwork behind the scenes and lets you instantiate this and just call the keyword Next on it. You can get this function Training Set and then just call Next Training Set. One at a time, it'll just peel off the next result from this yield statement. In this case, we have this infinite loop while true randomly choose one of the items or the index of one of the items in our list of examples and then pull out the example with that index, so with that number of that position in the list. Just randomly go through our bag of examples and pull out a new one each time. You might get the same one two or three times in a row every once in a while, but just repeats aren't a problem because this is not a real data set and we're not worried about actually how well we learn it. We're just worried about testing the machinery that does the learning. It's okay to be very fast and loose on this. The evaluation set does exactly the same thing as the training set. And again, that's not at all the behavior we'd want in learning an actual data set, but it's useful in just testing the neural network, making sure that all the gears are meshing and are well lubricated. Now, what's really cool here is we can actually return the functions themselves, these generators themselves, training set and evaluation set. These then become, you can think of them as little boxes or little machines or little tiny factories that when you call training set dot next, it'll just peel off the next example and we'll make use of that in the next exercise.