Late Arrivals & List Length (4/14)


suitcase.append(“sunglasses”, “undies”, “socks”, “flamingos”)

Hi guys, so I was doing the lesson stated in the title and I wrote the code wrong (above), I figured it out after reading the error message and fixed it (below)… I’m curious as to why the above code would not work though?

suitcase = []

list_length = len(suitcase)

print “There are %d items in the suitcase.” % (list_length)
print suitcase


the exercise validation is looking for multiply append keyword, and looking at the docs:

.append() can only handle appending a single item.


Hi thanks for your response. This page you linked, is this something I am supposed to be referring to while doing these lessons? This is the first time I’ve seen it.


if you don’t understand a built-in function like .append() the docs are an excellent place to read about the function. Reading docs is something you will do a lot when you get developers job


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.