LearnPy Hub
← Strings problems
Easy

Trim the Ends

Read a line that may start or end with spaces and print it between square brackets with the outer spaces removed, like [text].

Input

One line.

Output

One line.

Sample 1

Input
   hello   
Output
[hello]

Sample 2

Input
no spaces
Output
[no spaces]
solution.py
Output appears here
Trim the Ends · Python practice problem · LearnPy Hub