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.
Este exercício faz parte do curso
Practicing Coding Interview Questions in Python
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Reverse a string using reduce()
string = 'DataCamp'
inv_string = reduce(____)
print('Inverted string = ' + inv_string)