Question

I'm newbie to python. As I start coding simple python code using windows Python 3.3.3 Shell, when I try to save webtest1.py, it automatically adds extra line below. While running the code, this automatically causes invalid syntax error.

I check the code online on http://pych.atomidata.com/code, it shows, 'Line: 8 Column: 1 W391 blank line at end of file'.

Any solution? Appreciated.

saving .py file with new line automatic addition error

Était-ce utile?

La solution

You need to use brackets around print in python 3. print (htmltext) should solve your problem.

http://docs.python.org/3.3/library/functions.html#print

Edit: @Ashwini already stated that until I wrote this. I think you/he should write that in answers so it can be accepted.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top