SyntaxFix
Write A Post
Hire A Developer
Questions
here is a simple way to do it:
list1 = ["hello", " ", "w", "o", "r", "l", "d"] sorted(set(list1 ), key=lambda x:list1.index(x))
that gives the output:
["hello", " ", "w", "o", "r", "l", "d"]