def is_valid_url(url):
    'Checks if a given string is an url'
    pieces = urlparse(url)
    return all([pieces.scheme, pieces.netloc])
Checks if a given string is an url
def is_valid_url(url):
    
    pieces = urlparse(url)
    return all([pieces.scheme, pieces.netloc])