Pattern with zeros

Why is this code not passing test cases

@hrithik.anand02 You are missing the spaces. After each digit there must be a space. Compare it with the sample output.

Thanks a lot for helping