Issue
I have installed bs4 and Python 3.4.4.
>>> print soup.prettify()
File "<stdin>", line 1
print soup.prettify()
^
Syntax Error: invalid syntax
Solution
In Python 3.x, print
is a function, not a statement.
So, you want to call it as print(soup.prettify())
.
Answered By - Rushy Panchal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.