Skip to content

Instantly share code, notes, and snippets.

@trishantpahwa
Last active May 13, 2023 14:05
Show Gist options
  • Save trishantpahwa/3e9f4f1d016b0f54a810ffcf927730ed to your computer and use it in GitHub Desktop.
Save trishantpahwa/3e9f4f1d016b0f54a810ffcf927730ed to your computer and use it in GitHub Desktop.
Prints Public IP.
import requests
response = requests.get('https://api.ipify.org?format=json')
print(response.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment