Created
May 10, 2022 23:45
-
-
Save PythonCoderAS/9356180553674a4357ae96db5302056b to your computer and use it in GitHub Desktop.
Python one-liner to convert a newline-separated list of items into a space-separated list of items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys;sys.stdout.write(" | ".join(f"\"{word}\"" for word in sys.stdin.read().split("\n"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment