demo_requests_response_ok.py:
import requests url = 'https://www.begtut.com/python/demopage.htm' x = requests.get(url) print(x.ok)
➜ begtut>python demo_requests_response_ok.py
True