2021年5月4日星期二

How to remove duplicates in a list without the use of dictionaries or set?

code (not allowing me to paste in code here)

I am trying to create a program which sorts out words alphabetically and deletes in duplicates. For example, with Around the world, around the world, it should become ['around', 'the', 'world']. However, the output I get is ['around', 'around', 'the', 'the', 'world,', 'world.']

I am not allowed to use dictionaries or set which would make it easy to remove the duplicates. How can I remove the duplicate words without using them?

https://stackoverflow.com/questions/67394564/how-to-remove-duplicates-in-a-list-without-the-use-of-dictionaries-or-set May 05, 2021 at 10:51AM

没有评论:

发表评论