Hi All Thanks for your reply , what i am doing is , i am reading from file , using readlines() , I would like to check in these lines , if there is line belong to another one or not , if it is , then i would like to delete it ['0132442\n', '13\n', '24\n'] '13' is already in '0132442' '24' is already in '0132442' Thanks