What I want to do is to remove string elements from my list that have some duplicate parts. For example, if I have given list.
ls = ['02/27/1960', '07/21/2004', '08/13/2004', '09/12/2004', '02/27', '07/21', '08/13']
I want output as
ls_out = ['02/27/1960', '07/21/2004', '08/13/2004', '09/12/2004']
That is '02/27' already existed in '02/27/1960'.
(note that I'm not sure if this question is duplicated or not)