demo_requests_response_close.py:
import requests url = 'https://begtut.com/python/demopage.htm' x = requests.get(url) #close the connection to the server: x.close()
➜ begtut>python demo_requests_response_close.py