Serialization and Deserialization
Learn about the serialization and deserialization of data using the json module in Python.
We'll cover the following...
We'll cover the following...
Compared to strings, reading/writing numbers to and from a file is tedious. This is because the write() function writes a string to a file and the read() function returns a string read from a file. So we need to do conversions while reading/writing, as shown in the following program:
If we want to read/write more complicated data in the form of tuples, dictionaries, etc., to and from a file using the method ...