I am executing this line of code -
print(eval("print(2 +3)"))
but this instead of giving output as 5 gives output-
5
None
This is because you are giving eval() within print().
eval("(2 +3)")
This will return 5 as the function eval returns the value 5 which gets printed using the print()
However,
print(eval("print(2 +3)"))
Here inside the eval() you have used print(). So the inner print() prints the value 5 and the function eval() returns None as it has nothing to return. That None gets printed by the outer print()