Task Manager CLI
Overview
In this exercise, you will build a command-line task manager using Python. Users can add, remove, list, and search tasks stored in a dictionary. You will also refactor the code to improve efficiency and structure.
Structured Exercises
1. Use a Dictionary to Store Tasks
- Each task should have a unique ID (key) and a description (value).
2. Implement Task Management Functions
- Add a task (generate a unique ID).
- Remove a task by ID.
- List all tasks in a readable format.
- Search for tasks by keyword.
3. Extra Features (Optional)
- Refactor with List Comprehensions
- Optimize filtering/searching using list comprehensions.
- Refactor to Use Classes
- Replace the dictionary with a
TaskManager
class.
- Replace the dictionary with a
- Save Tasks in a File
- Store tasks in a JSON or text file.
- Implement functions in a separate helper module to handle file I/O.
This exercise will help you practice Python dictionaries, functions, refactoring, OOP, and file handling. 🚀