Multiple elements added with append

I have a question regarding Python Lists: Medical Insurance Project: https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-lists/projects/ds-python-lists1-project

In the previous exercises, it was sais that .append only takes one single element to add after the list. However, in the Medical Insurance Project, the example in the hint section of task 7 shows that it is possible to add multiple elements with .append, by using double parenthesis, like this:

estimated_insurance_data.append(("Maria", maria_insurance_cost))

Why is it that, when using double parenthesis, we can add multiple elements with .append?

Thanks in advance for your time!

1 Like

we are still adding only a single element to the list. the parenthesis means we have a tuple (which is an immutable list).

2 Likes