1. Learn
  2. /
  3. Courses
  4. /
  5. Practicing Coding Interview Questions in Python

Exercise

The reduce() function

Now, it is time for some reduction! As before you'll be given three tasks to complete. Use lambda expressions!

The necessary functions from the functools module are already imported for you.

Instructions 1/3

undefined XP
  • 1

    Reverse a string using reduce().

  • 2

    Find common items shared among all the sets in sets.

  • 3

    Convert a number sequence into a single number (e.g. [1, 2, 3] \(\rightarrow\) 123).