def remove_repeating(substr, s):
 index = s.find(substr)
 if (index >= 0):
  return u''.join([s[:(index + len(substr))], s[(index + len(substr)):].replace(substr, u'')])
 return s

def remove_repeating ( substr , s ) : index = s . find ( substr ) if ( index >= 0 ) : return u'' . join ( [ s [ : ( index + len ( substr ) ) ] , s [ ( index + len ( substr ) ) : ] . replace ( substr , u'' ) ] ) return s
remove repeating module names from string .