Problem in posting code

Whenever i paste my code to discussin window ,it automatically makes every line to the extreme left which makes code(python) wrong. Help

cook your dish here

def equal(lst):
temp=True
for i in range(len(lst)):
if lst[i]!=lst[0]:
temp=False
break
return temp

n=int(input())
for i in range(n):
num=int(input())
l=list(map(int,input().split()))
if equal(l)==True:
print(0)
else:
count=0
while True:
l[l.index(max(l))]=l[l.index(max(l))]-1
count=count+1
if equal(l)==True:
print(count)
break

1 Like