 In this video, I'll be explaining one solution to lesson three, practice exercise D, in which we need to select park and ride facilities in a given target city and export them to a new feature class. The solution will have a lot of elements that were used in exercises B and C, and these patterns should be starting to look familiar to you. Line four, I import the ArcPy site package, and then in line six, I set up a variable to represent the city on which I want a query for park and rides. I'm going to be doing an attribute query for the city, and then I'm going to follow that up with a spatial query to just get the park and rides that fall within that selected city. And putting line six up near the top like this lets me change the city so that I can test with different values, without hunting through my code to try to find where that is. So line seven, I set up the workspace, which is going to be my file geodatabase. I'll be working with three different feature classes, all the same geodatabase, so setting the workspace like this makes it easier for me to refer to those feature classes. In lines eight and nine, I set up variables to store the names of the two input feature classes. The rest of the code, some of it could go within try, accept, and finally blocks for simplicity. I've left those out here, although for really good high code quality, you're asked to include those in appropriate places in your project submissions. What I do next on line 13 is set up the SQL query string to get just the city of federal way on its own. So I'm doing this attribute query here similar to what was done in exercise B. I'm querying on the name field for the city, and the expression as a whole being a string needs to be in quotes. And I use string, got nation to plug the name of the target city inside single quotes. Once I have my query string on line 16, I can perform a selection in which I end up with a feature layer of just that target city. And by now the use of select layer, my attribute should be familiar to you. The first parameter is the name of the feature class and I'm querying. And remember in line 10, I set up a variable for that. The second parameter is the selection method that I want to use. And then the third parameter is the SQL query expression. And it's what we'll narrow down the cities to in this case, just the city of federal way. So now that I have a feature layer representing federal way, I can now do a select layer by location so that I can get just the park and rides that fall within that city. So I pass in the park and ride feature class. The type of spatial relationship that I'm using, which is contained by which we've seen in previous exercises. And then lastly, I supplied the city layer that I want to use to do the selection. That's the third parameter. Once I have the selection made, then I can copy those selected features into a new feature class. And just like you saw in practice exercise C, I'm using the copy copy features tool. And I specify my park and ride feature layer as the source of the features that I want to copy. The second parameter in the copy features statement is the name of the new feature class that I want to create because I only specified a name and not a path. A new feature class is going to be saved in the workspace, which is the Washington file to your database. And I'm going to call that feature class target park and ride facilities. Now at the end of the code, preferably within a finally block or somewhere at the end, you're going to delete the feature layers to clean them up. And in this case, we have two feature layers that we have to clean up. And that's all it takes to complete this exercise.