Flip

Use Python to reverse stdin by words (rev will do this by characters)

#!/usr/bin/env python3
import sys
for line in sys.stdin:
    print(' '.join(line.split()[::-1]))

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment