.zip() returns a zip object. If we cast this to
list by using the
list() function, we get an output which is similar to this:
a = [1,2,3]
b = [4,5,6]
list here is necessary, as one can’t print a
zip object. Now consider the output. It is almost what you want, with the exception that the nested iterables (the objects in parentheses
()) are not lists but tuples.
All you have to do now, is to convert these tuples to lists. The same
list() function can be used.
Have you learnt list comprehensions yet? If you, consider how you would use those. If not, consider the following:
You want to change each tuple to a list. You already know you can use the
list() function. Consider how you might change each tuple to a list. This process would involve the same process, repeated over and over…Remember, you have to loop through the list.
I hope this helps! My answers were designed as hints only here, but if you find yourself really stuck, feel free to ask for more help!