I’m taking this lesson right now and was having the same doubt, I’m glad I found your post!
From what I understood, when you use customer_data[-1].remove(False), the program reads the False specifically/separately, hence interpreting it as a boolean. When you use customer_data.remove(False), the program reads the False in the context of a list, , so it is not interpreted as a boolean, but as a list value.
That is great advice, but just a bit confusing for us noobs who are just starting out and only know what we have learned in the course so far. Even the hint that they give us for this, would lead you to believe that the answer would have been
See the post by @mtrtmk above. Note that he points out the second subscript will point to an element inside the object at some index. Given that the outer list consists of lists, in order to use the .remove() method we can only choose one subscript, and not two. The second subscript is pointing to an object inside the selected object. Those objects are strings or booleans, neither of which object have a .remove() method.
Also, as a side note, a lot of lists are dynamic and may grow in length. We cannot assume that the second, or third, or fourth element is the last in the list, so must target that element by direct index (from the left side) not the indirect index (from the right side).
Neither of those are correct.
Granted they both refer to list objects and both have the .remove() method, but we cannot be sure that [-1] points to the second element in the outer list.
To augment the earlier ‘advice’, every ‘noob’ must take responsibility for their own learning. That means going through the course at one’s own pace without putting a time deadline on completion of a module. Any concept that raises a brow (a question or some confusion) should signal a pause in progress during which time the learner can dive further into the concept with some practical and experimental examples gleaned from readings elsewhere, not just the course/lesson narrative.
Thanks! I don’t know how I missed @mtrtmk explanation…I must have overlooked it.
On a side note, I do agree with you when you say
Which I do. Part of what even makes that difficult is a lot of what you find, even if it seems like a beginner/noob question, tends to have the more advanced explanations and/or concepts which I have not been exposed too before and I tend to get lost in researching “well, what does that mean”. Slow and steady
I’ve been facing this issue for a minute and can’t quite figure it out. My apologies for having to come to you here. I concatenated the list in the final step of this exercise but you can see in the screenshot that it’s saying I did not complete the task correctly and the explanation given is" Your value for customer_data_final does not match! Did you add the new 2d list to customer_data ?
I believe I did add the 2d list to customer_data, and it appears to be working correctly to the right. What am I missing?
I’m not at all trying to be rude here, so I apologize if it comes across that way, but I don’t see the solve when I click your link. Or even advice on how to come to the solution. Could you provide more context, please?