Hello! Like probably many folks in this subtopic, I’m working through the Data Science Analytics path and have completed the Frida Kahlo Project. I live in the US and enjoy making homemade pizza
I’m getting some practice requesting code reviews and thank you, gentle reader, in advance for your patience and wisdom. With that out of the way, here’s my request for code review.
strong text
The instructions tell us to “append each painting individually… as tuples” but I found some documentation on .extend() – I got the outcome I wanted, but are there any ‘gotchas’ in using this method that I should be aware of?
Task 4
Append the following paintings to ourpaintings
list then re-print to check they were added correctly:
- ‘The Broken Column’, 1944
- ‘The Wounded Deer’, 1946
- ‘Me and My Doll’, 1937
Hint: Make sure to append each painting individually and that you’re appending them as tuples, not lists. (emphasis mine)
new_paintings = [('The Broken Column', '1944'), ('The Wounded Deer', '1946'), ('Me and My Doll', '1937')]
paintings.extend(new_paintings)
print(paintings)