Skip to content

Instantly share code, notes, and snippets.

@t0yv0
Created October 6, 2010 21:43
Show Gist options
  • Save t0yv0/614144 to your computer and use it in GitHub Desktop.
Save t0yv0/614144 to your computer and use it in GitHub Desktop.
def readFile(path):
f = open(path, 'r')
r = map(lambda x: x.strip(), f.readlines())
f.close()
return r
animals = readFile('animals.txt')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment