Colindapieman

Text file opener

Jul 8th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. __author__ = 'Colin McNeil'
  2. def getstrings(filename):
  3.     #Open the file with the filename passed in
  4.     file = open(filename,'r')
  5.     #Split into list of substrings with a split every line
  6.     stringo=file.read().split('\n')
  7.     #Trim empty space
  8.     del(stringo[len(stringo)-1])
  9.     return(stringo)
Advertisement
Add Comment
Please, Sign In to add comment