HF RL Explorer

Task: Substitute Multiple Whitespace with Single Whitespace in Python

Task: Substitute Multiple Whitespace with Single Whitespace in Python: a task in Terminal-Lego-15k (Harbor dataset). You need to write a Python script that takes a string containing multiple consecutive whitespace characters and substitutes them with a single space. The script should also strip…

The task

You need to write a Python script that takes a string containing multiple consecutive whitespace characters and substitutes them with a single space. The script should also strip any leading or trailing whitespace from the result.

Part of PrimeIntellect/Terminal-Lego-15k.