That is documented behaviour. There are different result attributes.
Your first query returns a list of results.
r = duckduckgo.query('DuckDuckGo')
if r.type == 'answer':
print r.results # [<duckduckgo.Result object>]
Your other search returns a disambiguation and your results are in r.related
not in r.results
r = duckduckgo.query('Python')
if r.type == 'disambiguation':
print r.related # [<duckduckgo.Result object>]
Edit: python-duckduckgo uses the DuckDuckGo API which does not give you all the search result links
Our Instant Answer API gives you free access to many of our instant
answers like: topic summaries (API example), categories (API example),
disambiguation (API example), !bang redirects (API example), and
definitions (API example).
This API does not include all of our links, however. That is, it is
not a full search results API or a way to get DuckDuckGo results into
your applications beyond our instant answers. Because of the way we
generate our search results, we unfortunately do not have the rights
to fully syndicate our results. For the same reason, we cannot allow
framing our results without our branding. Please see our partnerships
page for more info on guidelines and getting in touch with us.
You can't do what you want to do using the DuckDuckGo API but a possible workaround has been posted on Stackoverflow: https://stackoverflow.com/a/11923803/241866