How does zip(*[iter(s)]*n) work in Python?

s = [1,2,3,4,5,6,7,8,9] n = 3 zip(*[iter(s)]*n) # returns [(1,2,3),(4,5,6),(7,8,9)] How does zip(*[iter(s)]*n) work? What would it look like if it was written with more verbose code? Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them … Read more