PY
py
1
2
3
4
5
6
7
8
9
10
import requests
# Using the requests SDK to get data from a website
response = requests.get("https://api.github.com")
# Check if the request was successful
if response.status_code == 200:
print("Data:", response.json())
else:
print("Failed to retrieve data")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run