Human: Iterate through words of a file in Python Assistant: 
Here is some code to get a list of words `words` of a file 'myfile'

words = open('myfile').read().split()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.