Advertisement
atm-irbis

lines

Apr 7th, 2013
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def line_trim(s):
  2.     return s.split()[0]
  3.  
  4. f = open('in.txt','r')
  5. g = open('out.txt','w')
  6.  
  7. for i in f.readlines():
  8.     g.write(line_trim(i)+'\n')
  9. f.close()
  10. g.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement