Your question is Pickling in Python. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
What is pickling and unpickling?
Asked in the 1st Round Technical Interview stage. Implement a function that pickles a JSON-compatible Python object into bytes and then unpickles those bytes to reconstruct the object.
def pickle_round_trip(obj):
The function accepts one JSON-compatible value, including None, booleans, numbers, strings, lists, and dictionaries, and returns the reconstructed value. The returned value must compare equal to the original input.
def pickle_round_trip(obj):