How to handle mathematical function?

In General, the entrance will be introduced a mathematical expression that will calculate Y and X (with the assistance cycle will probiratsya list XS to be substituted). After using the x-s and y-s will be built schedule.
How safer to do all this? Tell me
July 8th 19 at 12:10
1 answer
July 8th 19 at 12:12
MyFunc =lambda x, y : eval(input()) ##Enter expression having x,y

MyFunc(1,2) ## function Call: x = 1 y = 2
What about safety? I did no day for tomorrow will be left? - jessy_Bartoletti commented on July 8th 19 at 12:15
Sorry, I read several times the issue but did not understand what you mean. The programmer is responsible for making the script/program. You can write to your script is bugged ports, waiting for connecting users and their teams, and allowed to do with them what they please. In fact, from the script/program that will produce some calculations, to have expected weird.

Break that can be hacked. Not a very well written script for computations in the worst case may fail, but even the operating system will not suffer. Well, or you pay for cloud hosting and the script will use too many resources you will have to pay - or are you about it? - tremaine.Kiehn commented on July 8th 19 at 12:18
: you could just use eval, but it's not safe, because to write anything you can, so I am looking for a solution. - jessy_Bartoletti commented on July 8th 19 at 12:21

Find more questions by tags ParsingMathematicsPython