Object Serialization with pickle

Medium Design Patterns & Final Challenges
Solve in Playground →

Problem Statement

Use the `pickle` module to serialize and deserialize a `User` object (attributes: `name`, `age`). Read a name and age, instantiate the user, serialize it to a byte stream, deserialize it into a new object, and print the new object’s details.

Input Format

A space-separated string and an integer.

Output Format

Print the reconstructed user details.

Constraints

None

Sample Input

Alice 30

Sample Output

Name: Alice
Age: 30

Explanation

Pickle allows complete Python objects to be converted to byte streams for storage or network transfer and reconstructed later.

Starter Code

import pickle

class User:
    pass

if __name__ == '__main__':
    # Parse input, serialize, deserialize, and print
    pass

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used