Hi, i had been doing some MIT opencourseware tutorials on Python.
The goal was to open a .txt file with thousands of words, convert this into a string and split it into a list, with
each element being a word. The remaining part of the tutorial was to write a hangman game using random lib.
Pretty easy, ok. But...
If I input the code into Python's shell, line by line, it does works all right.
However, If i write it down and then run the module, it gives me:
"AttributeError: 'module' object has no attribute 'readline'" or any other function i have been trying to call up,
although string lib has been sucessfully imported.
The random lib works ok, though.
I'm pretty sure there are no other string.py file at the same folder, should you suggest this. and I'm using 3.3.0.
- Thanks for the help.