What’s the best way to get an HTTP response code from a URL?

What’s the best way to get an HTTP response code from a URL?

Python Regular Expressions

Python Regular Expressions