Getting your current IP Address in Python

This is a simple Python script to check which external IP address you have.

Source code :

from requests import get


IP = get('https://api.ipify.org').text

print("IP Address is: " +  IP)

Output :

IP Address is: 127.0.0.1

Notes :

If you are compiling this Program on our website compile.work it won't work because, Internet access is currently unavailable in our Online Compiler for Security Reasons.


Output :


                

Comments :