Python validators url Example

import validators

string = "https://pyonlycode.com"

print(validators.url(string))

Output:

True