MaxLen error weekly assignment

Hi, I keep getting this error and I don’t really understand


why

This happens because input_sequences is an empty list. Check your implementation of n_gram_seqs

Thank you for your answer. My n_gram implementation returns the expected outputs

[code removed - moderator]

Indentation is wrong. The 2nd for loop is outside the 1st for loop.

You are right. What a silly mistake. Thanks