Thank you heiner55 and snippsat for your quick replies.
I tried the code heiner55 showed me and got this error message:
-- UPDATE --
Forget the question as I'm using Linux Mint I tried Kate editor and found out that the file was not coded in utf-8 so I saved it as a utf-8 and it works fine.
Thanks again. The two of you saved my day.
Now I just have to understand the code really well.
I tried the code heiner55 showed me and got this error message:
Quote:Traceback (most recent call last):Any idea how to find out if it's utf-8?
File "test3.py", line 6, in <module>
for line in thefile:
File "/usr/lib/python3.4/codecs.py", line 319, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 343: invalid continuation byte
-- UPDATE --
Forget the question as I'm using Linux Mint I tried Kate editor and found out that the file was not coded in utf-8 so I saved it as a utf-8 and it works fine.
Thanks again. The two of you saved my day.
![Smile Smile](https://python-forum.io/images/smilies/smile.png)