Conclusion

Conclusion

Python’s simplicity extends to how it handles files, which is one of the reasons it became popular with data scientists and, by extension, people working with machine learning and AI.

In this lesson, you learned about storing and retrieving data to and from the file formats you’re most likely to encounter:

  • As plain text.
  • As a CSV (comma-separated value) file, an import/export format used by many spreadsheet applications.
  • In JSON (JavaScript Object Notation) format.

You also learned about Python’s error handling mechanisms, the try, except, else, and finally keywords, and how to use them when not-so-unexpected errors occur when reading files.

Get ready for the next lesson, where you’ll go beyond the confines of your own computer!

See forum comments
Download course materials from Github
Previous: JSON Files Demo Next: Quiz: Working with Local Data