Search⌘ K
AI Features

Challenge: Decode the Message

Explore how to extract digits from strings and apply sorting plus value mapping using decorators in Python. Understand filtering with functions and enhance your skills with functional programming practices.

We'll cover the following...

Problem 1

You are given a message (string). Your task is to extract only the digits from the message.

  • The function clean_message should handle the filtering (keep only digits).
  • A decorator decode should wrap clean_message and return the cleaned digits as a string.
...