I am trying to make a function that takes a copied list in Japanese and only returns the unique words, separated by new lines in Google Docs. The image below is my work so far. I do not know why when I paste my copied Google Docs list, it only returns the first value. Any thoughts?
print('Paste your list: ')
j_list = input().split()
def thinner(japaneselist):
unique_japanese = []
for x in japaneselist:
if x not in unique_japanese:
unique_japanese.append(x)
for x in unique_japanese:
print(x)
print(len(unique_japanese))
print(j_list)
When I try copying and pasting this:
私
彼
かれ
私
彼
It just returns: ['私']