How to get each n-pairs consecutives items in a list python?

Hello, I have this list:

tab = [[900, 640, 170, 400],[200, 540, 170, 230],[960, 450, 520, 1000],[300, 780, 410, 500]]

I only want to get each 3 pairs consecutives items of the lists like that:

[900, 640, 170, 400], [200, 540, 170, 230], [960, 450, 520, 1000]
[200, 540, 170, 230], [960, 450, 520, 1000], [300, 780, 410, 500]

But my code gets also the 2-pairs items of the list, like that:

[900, 640, 170, 400], [200, 540, 170, 230], [960, 450, 520, 1000]
[200, 540, 170, 230], [960, 450, 520, 1000], [300, 780, 410, 500]
[960, 450, 520, 1000], [300, 780, 410, 500]

That’s my code:

first3 = ""
for i in range(len(tab) - 1):
    for j in range(i+1, len(tab)):
        if len(first3) == 0:
            t = j + 2
            first3 = f"{tab[i:t]}"
            break
        else:
            first3 += f"{tab[i:j + 2]}"
            break
print(first3)

I think the nested loops might be overcomplicating things here, so perhaps you can work out a way to avoid them?

For the code as it stands you should have a look at how many iterations your loops complete and the contents of first3 within those loops.