What *x, y = some_tuple does in python 3+ (I don’t think it works for 2.x) is store the last element of the tuple in y and the rest in x. If if next(it) returns 4 elements in your code sample, mb will be a tuple with 3 element after doing *mb, yt = next(it).