I ran this code in the Python terminal:
>>> for news in news_list:
... print news("li", {"class", "first"})[0].a["href"]
...
...
I want to be able to close this for loop in the terminal, but I have no idea how to. I tried pressing Enter twice but it doesn't work.
print newsandprint news_listbefore that and give us the output? We'll get an idea of the datastructures there. – SiddharthaRT Dec 10 '12 at 10:02