On Sun, Aug 31, 2014 at 6:31 PM, Richard Dillon <[email protected]> wrote:
> My text file has five numbers, 1-5
> I don't what the problem is.
> I've written the file using Word (saved as .txt ) as well as TextEdit
> Python 3.4.1 on a Mac
We don’t really know either, without seeing the file. It probably has
some unwanted garbage produced by your fancy-schmancy editor. Get a
real plain text editor (TextWrangler for example) and don’t use
rich-text editors. With a real editor, your code works here.
Also, don’t do this:
> except:
> print('An error occured.')
It’s better to let Python show the exceptions.
--
Chris “Kwpolska” Warrick <http://chriswarrick.com/>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor