You've learned a lot about working with files, which is great because files can contain your own data. So you can feed your own unique data into Python code and have a process that data. You seen how to open read from as write to files and how to highlight key information using AI. You've also seen how to work with structured data. That is a table of data stored in, say, CSV format. And you've seen how to create your own functions to work with files and with data, you can now build up more sophisticated workflows. For example, we'll see in this video how you can iterate through a set of files, extracting key information for each one, and it prompt a large language model using that information. And we'll see how to put all of this together to plan out an entire grand vacation around the world with the help of Python and AI. Let's take a look. In this lesson, you use everything you've learned so far to plan a vacation around the world. To get started, let me import my usual helper functions. I'm going to define a new function for reading CSV files. The inputs a file, opens it, load the data, and then returns the data. So let me run that. So let's read it. Read our itinerary CSV into this variable. And then let's display it. And so that's our vacation itinerary. Previously you defined this read journal function. And so as you saw before you can read the journal like so. And you get the text of the file Sydney dot text. And previously you saw how we can extract the restaurants and special dishes using the large language model. This is the same prompt. And if I run that, you get this list of restaurants and dishes to consider. Now, I've already taken this CSV data and saved it in a file. Sydney dot csv. What you can do, is send those Sydney restaurants via read CSV Sydney. And this is using the read csv function that we defined earlier. But if you run this, this loads the csv file into the variable Sydney restaurants. They will then display them with this nicely formatted table. Now, let's look at how we can create a detailed itinerary. And when we load the days for each stop Let's also figure out what restaurants and specialties you want to try in that city. So let's start by doing that for Sydney, since I've already loaded the restaurant information. Sydney is the seventh trip destination. And so to access this itinerary, it would be itinerary square brackets six let's assign the city, country, arrival, and departure to these variables. With restaurants equals Sydney restaurants. is this data we have from the CSV file. And now here's a prompt that you can use to instruct a large language model to create a detailed itinerary. So I'll visit city country from arrivals departure. Create the daily itinerary with detailed activities including designated times for breakfast, lunch and dinner. I want to visit the restaurants listed in the restaurant dictionary. Here we're using the F-string to insert restaurants, which is actually a dictionary because we imported it from a CSV file. And then we get the response of the large language model and display the results. So let's run that. This might take a few seconds to run. And this creates a detailed itinerary where suggests for breakfast. Try a flat white. That's a classic Australian coffee that I think is delicious. And then here's one of other recommendations for the restaurants. Here's another one with that specialty crispy skin duck and so on. So we've done a lot. And you've seen the code to create a detailed itinerary for a single city. Let's see how we can do this for all the cities on your trip. So, I'm going to start off creating detailed itinerary as a empty dictionary. That's where the curly braces here does. And then let's create a for loop. Where for each trip stop in the itinerary, let's set city, country arrival and departure to these variables. And we're going to load a CSV from a file city dot csv. So city is Sydney. This f-string would turn this file name into Sydney dot csv. Let's keep on building on the for loop. So because this is going to run for a while, I want the for loop to tell me creating detailed itinerary for that city. And then let's create this prompt a visit to city from this time to this time. Create detailed itinerary Breakfast, lunch and dinner. And the restaurant dictionary will be inserted in here. And then lastly, we will set the detailed itinerary for that city to be get LLM response to this prompt. So let's run this. When you run this yourself will take a little bit longer. But we just speed up the video here and we're done. And now all the detailed itineraries are saved in this dictionary detailed itinerary city. And so if say you want to display the detailed itinerary for Tokyo, you can then display markdown detail itinerary like so. And ooh this looks like an exciting holiday to take in Tokyo. We went through a lot in this Jupyter notebook, and I know we went relatively quickly. Please do run the code yourself and read through the code to make sure that you understand. I'll also encourage you to change the code. Maybe tell the large language model that you're an early riser. And want the itinerary that starts from 6 a.m. every day. Or maybe you're a late riser. And don't want to get out of bed until 11 a.m every day. Do check out the itineraries for different cities. And remember, as usual, that if there's any code you have a question about, you can always talk to your AI chatbot. Congratulations on completing this course! You've seen how to use text and CSV files in Python, and how to leverage large language models to accomplish a lot of tasks. A couple years ago, accomplishing what you're seeing in this course, would have been really difficult, or perhaps even impossible, even for very experienced programmers. But thanks to the availability of AI language models, a beginner coder can now build applications that even the best programmers in the world would have struggled with a couple years ago. That's what makes this such an exciting time to learn how to program, and how to use AI. The set of things that are now possible has expanded rapidly. And so there are lots of things the beginner programmer can do that just no one on the planet yet has gotten around to doing yet. And so there are lots of opportunities for you to write code to help yourself, your family, your friends at work and at home. I hope that after seeing some of what writing code can do, you continue exploring applications with your own data and interests. Now you've seen a lot of different helper functions in this course that allow you, for example, to upload the download files or display data nicely, like tables in a notebook. Many of these functions use Python code that was written by someone else, and that's available online free for you to use in your own programs. In the fourth and final course of the sequence of short courses, you'll learn how to access these prewritten Python programs, known as packages or sometimes libraries. This will let you access a huge set of very powerful functions and will let you, often with just a few lines of code, do really powerful things. The examples in the final course will be the most fun yet. I look forward to seeing you there.