Cannot unpack non-iterable int object

When calling inser_aduio_cilp() function it says cannot unpack non-iterable int object , It seem the problem is from previous_segments and as i know it a list it must be iterable here is screenshot of the error

Ok, it looks like you’ve got a good idea about what is wrong and what the error message means. Now you need to work backwards to figure out how it happened. Where does that previous_segments object get generated and why is it an “int” instead of an iterable object?

1 Like

I completed the code as instruction said # Step 2: Initialize segment times as empty list (≈ 1 line)
previous_segments =