Get IP address in Python

from requests import get
ipv4=get('https://api.ipify.org').text
print(ipv4)