i am getting error in this code for checking whether a number is prime or not
m=int(input("Enter an integer: "))
factorlist=[]
x=[]
def primelist(m):
for i in range(1,m+1):
if m%i ==0:
x=factorlist.append(i)
return(x)
def isprime(m):
return(primelist(m)==[1,m])
print(isprime(m))
I tried to execute the code to check whether a number is prime or not,i am trying to understand what is the error in the code