SHARE
TWEET

Untitled

a guest May 19th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #/usr/bin/env python3
  2.  
  3. import fileinput
  4. from argparse import ArgumentParser
  5.  
  6. parser = ArgumentParser()
  7. parser.add_argument('-s', '--separator', default=",", help='Separator')
  8. parser.add_argument('files', metavar='FILE', nargs='*', help='files to read, if empty, stdin is used')
  9. args = parser.parse_args()
  10.  
  11. print(args.separator.join(line.strip() for line in fileinput.input(files=args.files)))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top