+ 1
Can someone explane EVAL?
how it works? in example (1**2**3) transform to 1. dont understand. https://code.sololearn.com/cszg1xG6WMNf/?ref=app
2 Réponses
+ 2
Eval function operate in the string "1**2**3"and output the result as mathematical operation.It will calculate 1**2 then the result is 1 again will be powered by 3 : 1**3 result 1.With a simple print function you can not doing this mathematical operation in string data type ,then we use eval .
+ 2
thanks a lot!!!