Minival lets you run code snippets online. It's an example of how you can use seccomp(2) to build a simple sandbox. You can find the full tutorial here.
Paste your code:
Language: Python 2.7.14Perl 5.022001
Result: