作为初学者,我正在努力将此代码转换为伪代码。有人可以帮忙吗?我将非常感激......
for i in range (0,len(sentence_split)):
found = False
for j in range (0,len(words)):
if sentence_split[i] == words [j]:
found=True
if found==False:
words.append(sentence_split[i])
答案 0 :(得分:0)
如果以pythonic方式编写代码,它看起来像伪代码,仍然可以运行。
for part in sentence_split:
if part not in words:
words.append(part)