The Real World

For three weeks, your data has lived inside your code. You typed it in by hand -- a list of names here, a dictionary of amounts there. It was always clean, always formatted correctly, always exactly what you expected. That is not how the real world works. The CSV file sitting in your Downloads folder right now has trailing spaces in the customer names. Someone entered a region as "west" in row 12 and "West" in row 340 and "WEST " in row 517. There is an empty row at line 89 that will crash your loop if you are not careful. The amount column has a dollar sign in one entry and a comma in another. This is normal. This is what every data file looks like, everywhere, always. This week you open that file. You read it line by line. You split each line into fields, clean every field, build the list of dictionaries you mastered in Week 3, run the calculations you built in Week 2, and write the results to a new file your manager can actually use. The function you wrote on Day 3 -- the very first one -- is still in there, still formatting sale records. Except now it is part of something much larger. By Friday, you will have a script that does your Monday morning job. Not a toy version. The real one. Double-click, wait three seconds, open the report. That is where this week ends.