Chapter 5

Working with Data in Python

This chapter covers the following topics:

  • File Input and Output: This section shows how to work with test files in Python.

  • Parsing Data: This section discusses how to parse data into native Python objects.

  • Error Handling in Python: This section discusses how to use try-except-else-finally to work through errors in Python input.

  • Test-Driven Development: This section discusses using software testing to validate function.

  • Unit Testing: This section discusses how to use the internal Python module unittest to automate Python code testing.

There are numerous ways to ingest data into a Python program. You can get input from the user, pull data from a website or an API, or read data from a file. The trick is ...

Get Cisco Certified DevNet Associate DEVASC 200-901 Official Cert Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.