I am trying to find perfect number with using a function in python but I want to do this without using any parameters in function and using double for loop. I wonder that if it is possible. My example code is under the below. I would appreciate it if you help.
def perfectnumber():
sum = 0
#These numbers going to be our numbers which will be divided.
for j in range(1,1001):
#These numbers going to be our numbers which will divide first loop numbers(j)
for k in range(1,1001):