Sunday, 2 October 2022

eval function in python

 The eval() function evaluates the specified expression, if the expression is a legal Python statement, it will be executed.

Sample scripts :

val = 'print("https://intheworldperfectfull.blogspot.com/")'
eval(val)

Result :

https://intheworldperfectfull.blogspot.com/


Source : w3schools

No comments:

Post a Comment