Skip to main content

text/trim

1#!/usr/bin/env python3
2"""
3Trim removes leading/trailing whitespace from a string passed on stdin.
5Usage:
7 $ echo " hello world " | trim
8 hello world
10"""
12import sys
15if __name__ == '__main__':
16 sys.stdout.write(sys.stdin.read().strip())