how to avoid new line while saving file in windows python 3.3 IDLE?

452 views Asked by At

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

1

There are 1 answers

0
Lafexlos On BEST ANSWER

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.