For the following line of code:
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?
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.