Earlier I heard that eval(input(a)) will convert a string automatically to int, but if i code
age = eval(input(\"enter age\"))
eval() is used to verify an expression. On number is considered an expression, except octal numbers (numbers that start with 0). int() handles string to integer conversion. There are many reasons why you should avoid using eval(). Just keep in mind:
Python 2.x
x = raw_input('Enter number here: ')
Python 3.x
x = input('Enter number here: ')
Python 2.x
Security risk:
x = input('Enter number here: ')
Python 3.x
Security risk:
x = eval(input('Enter number here: '))
Also, keep in mind that eval() has the potential to run code, which could cause a huge security risk. I suggest not using it unless you clearly know what you're doing or it could compromise your application.