Hey guys, two questions – first and foremost, why do zipped, nested lists display with parentheses instead of brackets, given that brackets are the signifiers for lists? Is it to avoid syntax errors? That is, why does
Second question is, why wouldn’t you always assign the variable as a list object? That is:
some_list = ["Terry", "Joanne", "Mark"] another_list = [12, 46, 28] zipped_list = list(zip(some_list, another_list)) print(zipped_list)
Is there some utility I’m not aware of to saving a variable as that positional object rather than the list type?
Likely it is more so that learners can see all the moving parts and how they are transformed from one thing to another. It isn’t necessary at this point to be concerned over efficiency. That comes later. The main concern here is learning the basics and how built-in functions behave and their correct usage and syntax.
Hi, there.
I found a question here when im tring to print (list_of_names_and_dogs_names) after print(list(names_and_dogs_names)).
The output is . No any values.
Cheers