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