Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My question is based on this article.

My Wikipedia lens is working well and this article is very nice. But I don't understand, what is this string doing:

for article in self.wikipedia_query(search):

I want to link my Lens with Google AJAX Search API, but my code is don't working.

share|improve this question

1 Answer 1

You have a basic understanding of Python, right?

It's a basic for-loop which iterates over the return value of the wikipedia_query() method and stores it as article for each iteration. Same as each simple loop, like:

for x in range(4):
    print x
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.