removing duplicates in a list
Python
num = [2,3,4,5,2,6,3,2]
x = []
for i in range(len(num)):
if num[i] not in x:
x.append(num[i])
else:
pass
print(x)
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.