There have been some definite changes between Python 2.x and Python 3.x.
While you are in the Python 2.6 interpreter, your code works fine, but when you dropped into a terminal and
started python, you got python 3.x
so to be clear:
print 'Hello World'
What version of Python are you using?
Python 2.x has the raw_input() function, but that was done away with in
In Python 3.x your code would be:
var = input("Enter something: ")
print ("you entered ", var)
Note the () in the print function.
this happens when you have Python run...
Not sure what your problem is, as you did not say how this is failing. However, looking at the code, are you loading the file contents into a list or do you try to cycle through the file for each guess?
I needed IDLE to be able to find the standard pip installed modules
so I could import things like numpy, or matplotlib, etc., so this is what I did:
sudo gedit /usr/local/lib/python3.6/site.py
change the line:
USER_SITE = '/usr/share'