python-scripts/scripts/Public_IP_Address/my_public_ip.py
2022-10-01 09:56:37 +05:30

5 lines
129 B
Python

from requests import get
ip = get('https://ipv4.icanhazip.com').text
print('>>> My public IP address is: ' + ip[0:-1] + ' <<<')