python - How to remove duplicates in strings within list? -


i have list of string in each string duplicate need remove. f.e.:

lst = ('word1 2 36 2 2' ' word2 96 5 5 5 14' 'word3 45 6 45 45')  

etc.

i need:

lst = ('word1 2 36' 'word2 96 5 14' 'word3 45 6') 

generally:

  1. create dictionary each key wordn
  2. in key, convert item 2 through n of list set
  3. iterate through dictionary, building new list each key , set's contents

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -