Python in grasshopper_how to add point from python to grasshopper

I have a python script to generate point matrix. But when I have python in grasshopper . it not return physical point in rhino. How could I

import rhinoscriptsyntax as rs
Def main():
imax =5
jmax= 5
Pt = {}
for i in range(imax):

for j in range(jmax):

x = i
y = j
z = 0
Pt[ (i,j) ] = (x,y,z)
Point = rs.AddPoint((x, y,z))
return Pt

a = Pt

Normally you don’t add objects to the document with a script, instead you would bake the resulting output (a) to get the points into the document.

–Mitch