Answer:
In your program you should write:
x = x // i
Instead of:
x = x / i
And you should not put x on your list
So your code should be like
x = int(input("Input an Integer:"))
res = []
while x != 1:
---> for i in range(2, a):
if x % i == 0:
res.append(i)
x = x // i
break
print(res)
Let me know if this helps you or not, Happy Coding.