 Let's write a program that takes a city, state, and postal code, called a zip code in the United States, and splits it into the city, state, and zip code as separate variables. We really want to make a plan before writing this program. Here's our plan. Find the index where the comma is in the address. Everything from the start of the string up to, but not including, the comma is the city. Now, find the position of the last space in the address. Everything from that point to the end of the address is the zip code. And everything between the comma and the last space is our state. Here's the start of our program. I've already put our plan into the comments, and I've coded the user input to get things started. We'll get the comma index by telling address to find the position of the comma. Then the city will become a slice of the address starting at position zero up to, but not including, the comma index. Because we're starting at position zero, we can leave that out if we desire. Now, find the position of the last space with the rfind method. The last space index is address.rfind blank. That means the zip code is going to be a slice of the address from last space index to the end of the string. And because it's going all the way to the end, we can leave off the second number. Finally, we get the state with another slice. Our starting index is one past the comma index, and we go up to, but not including, the index of the last space. Now, let's get rid of any leading and trailing spaces from all of our variables. City will be reassigned as city.strip. We'll do the same for the state and the zip code. And then print the results. Now let's run the program. We'll go for Gibson City, Illinois, 60936, and the parts of the address are now separated. Let's run it again with different data and lots of extra spaces. Put a few blanks there. Newark, the state is Delaware, and the zip code is 19711. And again, we get the results we wanted. And that's how you can use string methods to manipulate a string.