demo_requests_response_url.py:
import requests url = 'https://www.w3schools.com/python/demopage.htm' x = requests.get(url) print(x.url)
C:\Users\My Name>python demo_requests_response_url.py
https://www.w3schools.com/python/demopage.htm