I want to show that in lattice graph 1D, 2D, and 3D the mean distance of the nodes increases by N^(1/D) where D is the dimension. what I did is:
def lattic(ns