I do not understand why my code is not working, could anyone help me with this one? It is supposed to print a list of palindromes (numbers that are equal to themselves if read backwards) lesser than or equal to the input. When I try to execute it, it writes: /bin/sh: python: command not found.
w = input('Enter a number: ')
n = int(w)
g = []
for n in range(n, 0, -1):
r = 0
while n != 0:
a = n % 10
r = r * 10 + a
n //= 10
if n == r:
g.append()
print(g)