examples/files/strip_newlines.py
#!/usr/bin/env python
from __future__ import print_function

import sys
filename = sys.argv[0]
fh = open(filename, 'r')

lines = [ line.rstrip("\n") for line in fh.readlines() ]

fh.close()
print(lines)