Check whether the input contains a URL.
Simple pattern match; does not verify that the URL exists.
x (object) – Value to check.
True if x looks like a URL.
True
x
bool
Examples
>>> is_url("https://www.python.org/") True >>> is_url("xxx") False