urls = ['http://www.myurlnumber1.com/foo+%bar%baz%qux',
    'http://www.myurlnumber1.com']
unique = {'{}://{}'.format(u.scheme, u.netloc) for u in map(urlparse, urls)}
print(unique)
Checking if element in list by substring