For the following line of code:

Screen Shot 2020-09-07 at 12.07.15 PM

From what I understand, results.attrgot(‘content_url’) adds a new element to ‘results’ with the property
‘content_url’. When I prints results, I get:

However, when I print ims, I get the following urls:

Why is this?

1 Like

What you see is pretty much the expected result - attrgot gets the desired property for each member of the list, so in this case you see that ‘results’ is some kind of ImageObject and ‘ims’ is the corresponding content_url of each of these objects.

1 Like