July 2024
Beginner to intermediate
818 pages
17h 32m
English
This chapter will look at how we can work with data structures that have a variety of data types. This often means inspecting the type of an attribute, an element of a tuple, or a value in a dictionary.
In previous chapters, we’ve avoided spending too much time on data validation considerations. In this chapter, we’ll look closely at validating input values to be sure they conform to expected data types and value ranges.
This data validation is a kind of type-checking. It validates a narrower domain of values than the very broad classes of integer or string. The application must check the values of objects to be sure they’re valid for the intended purpose.
Some data structures like JSON or XML documents ...
Read now
Unlock full access