I am trying to define a function which calculates the distance between two particles and prints out a table containing the distances. However, when I use the function, nothing is printed. What am I doing wrong?
au = 1.49598e11                        #astronomical unit in meters
rx = au * np.asarray([.5,.8,.2])       #x-comp separation vector
ry = au * np.asarray([2.6,9.1,3.7])    #y-comp separation vector
rz = au * np.asarray([.05,.1,.25])     #z-comp separation vector
def svec(x,y,z):
    '''computes the magnitude and vector components of the distance between two particles.'''
    #for loop to compute vector components of separation between two particles
    rvec = []
    for i in range(3):
        if i < 2:
            vx = x[i]-x[i+1]
            vy = y[i]-y[i+1]
            vz = z[i]-z[i+1]
            rvec.append([vx,vy,vz])
         if i == 2:
             vx = x[0]-x[-1]
             vy = y[0]-y[-1]
             vz = z[0]-z[-1]
             rvec.append([vx,vy,vz])
    return rvec
    comp1 = ['x-comp[m]','y-comp[m]','z-comp[m]']
    r0 = rvec[0].insert(0,'particle 0->1')
    r1 = rvec[1].insert(0,'particle 1->2')
    r2 = rvec[2].insert(0,'particle 0->2')
    print(tabulate(rvec,headers=comp1))
    
returnline will not be executed. Did yuo mean to indent that too?