I have built a platform on django for running python scripts. The user is able to write their Python script in a text-area and when a button is clicked, the script should run on the back-end. It should also check for test cases from a database (like Hackerrank).
I have tried using the eval()
function but the problem is that when the user writes input()
in their code it should take the values from database for input.
Please help me figure this out.