Last active 1731508154

why is PIP needed when learning python?

Revision 843c1917256c8faec97bb23031425a133ca0143f

why-pip.md Raw
import requests

def get_data():
    url = "https://jsonplaceholder.typicode.com/posts/1"
    response = requests.get(url)
    
    if response.status_code == 200:
        print("Data retrieved successfully:")
        print(response.json())
    else:
        print("Failed to retrieve data. Status code:", response.status_code)

if __name__ == "__main__":
    get_data()