I have one simple question about throwing exeptions in re.match function
Is there a way to ‘match’ function threw an exception? Maybe some flag. If this is not possible maybe there is some other function in RE library which throw an exception when the list will be empty for example.
Example:
verify_link=re.match(".*"+str(country).lower()+"."+str(city).lower()+".*",link)
This example in some cases returns None
I am looking for a method that would throw Exception, not None
I can do this by ‘if’ statement, but mayby there is any other way
There is no such function(s) in Python
remodule. See the doc: