Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import requests url = 'https://w3schools.com/python/demopage.php' #to demonstrate the 'timeout' parameter, we set the timeout to 0.001 to guarantee that the connection will be timed out: x = requests.get(url, timeout=0.001) print(x.text)
Connection to w3schools.com timed out. (connect timeout=0.001)