list = [1, 2, 6, 2, 9, 8, 1]
for i in range(0, len(list)):
for j in range(1, len(list)):
if list[i] == list[j]:
list.pop(j)
print(list)
I have tried by using this code
list = [1, 2, 6, 2, 9, 8, 1]
for i in range(0, len(list)):
for j in range(1, len(list)):
if list[i] == list[j]:
list.pop(j)
print(list)
I have tried by using this code