YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← List Comprehensions 4 Solution - Design of Computer Programs

Get Embed Code
1 Language

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. And this is how I solved the problem.

  2. I assigned ta_300 to name + is the TA for
  3. + course for name, country, course in ta_data.
  4. And, notice I had to use this country
  5. even though it didn't show up here
  6. and that's because each of these lists contain 3 elements
  7. and I need to reference all three of those elements.
  8. I only did this if course.find for this string CS3--
  9. because you'll notice all of the 300 level classes
  10. have CS3 in them--was not equal to negative one.
  11. Because, remember, find returns negative one
  12. when it doesn't find what you're asking for.
  13. And when I run this, I get exactly what I want.
  14. Good work.