Skip to content

Instantly share code, notes, and snippets.

@hungneox
Forked from fyears/soinput.py
Created April 30, 2014 14:01
Show Gist options
  • Save hungneox/2ef7e5c7411566e4a870 to your computer and use it in GitHub Desktop.
Save hungneox/2ef7e5c7411566e4a870 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
usage:
cat about.txt | python soinput.py
'''
import sys
def read_in():
lines = sys.stdin.readlines()
for i in range(len(lines)):
lines[i] = lines[i].replace('\n','')
#print lines
return lines
def main():
lines = read_in()
print lines
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment