Tip:
Highlight text to annotate it
X
And let's go through each of the options.
This first option will not work.
Since ta_data is a tuple
containing 3 elements, we need to reference each of those 3 elements
for Python to understand what we want.
Here we only reference name, country;
we don't even reference course at all,
so Python gets confused and if you try to run this you will get an error.
The second option looks great.
It's readable; name, plus lives in country
is very easy to understand.
It references all 3 variables in ta_data.
Looks like I forgot my closed brackets here.
This third option will also work.
It has 2 variable names,
and we reference all 3 elements in the tuple,
but I don't like this one as much as the second one.
The reason being "x lives in y"
doesn't remind me that I'm talking about a name and a country.
As far as readability is concerned,
I prefer option 2.
And, you can see, if we try to run option 1,
we get an error message--value error--
too many values to unpack.
If we run option 2 or 3 however,
we get exactly what we want.