i am confused on how to remove repeating value from a but let reside one of them list using a loop..i have tried my best to figure it out but couldn’t

  django, list, python, python-3.x

unconfirmed=[‘adeen’,’shahzaib’,’zaid’,’shahzaib’,’shahzaib’,’shahzaib’]
while ‘shahzaib’in unconfirmed:
unconfirmed.remove(‘shahzaib’)
print(unconfirmed)

Source: Python Questions

LEAVE A COMMENT