NameError: name 'raw_input' is not defined

num=int(raw_input("\nPon numero"));

rev=0;
while(num!=0):
rev=rev*10;
rev=rev+num % 10;
num=num/10;

print(“Numero de reversa:”,rev);

raw_input() is a Python 2 function that has since be removed, leaving Python 3 with input(), only.

2 Likes