Getting an Error while print the first code-Pls help

Hello Everyone,

I just started learning Python, I wrote a small code but always getting an error like:
print (ip)
NameError: name ‘ip’ is not defined

from geoip import geolite2

ip = “”

locator = geolite2.lookup(ip)

print (locator)

I would guess that you put the print(ip) before the ip="…". In
Python names do not exist before they are defined.

Cameron Simpson