python nzec error

Why am i getting nzec error in this code

n=int(input())
a=[int(x) for x in input().split(" ")]
b=0
for i in range(0,len(a)-1):
for j in range(i+1,len(a)):
b=b+abs(a[j]-a[i])
print(b)

@akshat_0412 could you specify the question. As this language is python we need indented code.

n=int(input())
a=[int(x) for x in input().split(" ")]
b=0
for i in range(0,len(a)-1):
for j in range(i+1,len(a)):
b=b+abs(a[j]-a[i])
print(b)

@praful99 this is the intended code.
please help me