demo_requests_response_status_code.py:
import requests url = 'https://www.begtut.com/python/demopage.htm' x = requests.get(url) print(x.status_code)
➜ begtut>python demo_requests_response_status_code.py
200