I've started to learn about the pickle module used for object serialization and deserialization.
I know that pickle.dump is used to store the code as a stream of bytes (serialization), and pickle.load is essentially the opposite, turning a stream of bytes back into a python object. (deserialization).
But what are pickle.dumps and pickle.loads, and what are the differences between them and pickle.dump and pickle.load? I've looked at the documentation, but I am having trouble differentiating between the two.
pickle.dumps(obj, protocol=None, *, fix_imports=True, buffer_callback=None) ; Return the pickled representation of the object obj as a bytes object, instead of writing it to a file.
pickle.loads(data, /, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None) Return the reconstituted object hierarchy of the pickled representation data of an object. data must be a bytes-like object.