I am trying to make a programme that takes words from the user, puts them in a list and then prints the amount of unique words that the user entered. The programme prints out the unique words when it receives a blank input. This is what I wrote.
amount = []
nuword = input('Word: ')
while nuword != '':
  nuword = input('Word: ')
  if nuword in amount:
    amount.pop(-1)
  else:
    amount.append(nuword)
print('You know',len(amount), 'unique word(s)!')
Is there a simple way to print all of the unique words in a list. Like some kind of function? Or do I have to change something in the loop?
 
     
    