English subtitles

← Split Solution - Programming Languages

Get Embed Code
6 Languages

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

  1. For the first one, Python is fun, there is a space here and a space there.
  2. There will be three elements in the return list--Python, is, and fun.
  3. This next one reminds us that split only splits on spaces.
  4. We might be tempted to break up July and August,
  5. but the split function won't.
  6. There are only two elements of the return list--"July-August" and "1842."
  7. Finally, down here we might like to break this up into 6 times 9 equals 42,
  8. but officially there are no spaces in this string.
  9. We'll just get out a singleton list--a list containing one element, the original string.
  10. "July-August 1842" is probably within a year of when Ada Lovelace wrote
  11. the first computer program for the difference engine or analytic engine at the time.
  12. It was to compute some mathematics.
  13. Also, if you're not sure why 6 times 9 would be 42--don't panic.
  14. But you may want to check out the works of Douglas Adams.