Dictionaries Part Deux
Things to remember:
- You’re looping through each row. If a state exists, do one set of things. If not, do another set of things. That’s the pattern for both 1 and 3.
('\t').join(["some", "LIST", "of", "things"])
is an idiom! Live it, love it, use it. You can also join around spaces, commas, whatever you need.- Got a header in your list of lists? Slice it off
- Got bad data? Manually clean it. Or automatically clean it. Or try/except.
Dictionary exercises today
We’ll spend the whole class working individually on your homework. I’m here. Use me. It’s due 11:59pm Weds.