# [Python 2] This is the second iteration of an answer that has been cracked once by @HyperNuetrino using a method I had not expected. I've now patched it so hopefully the only solutions left will have to abide by the restrictions I intended. *Implements addition as a named function* <!-- language-all: lang-python --> import sys c="".join(open(__file__).read().split('\n')[4:]) if set(c)-set(' &)(,.:[]a`cdfijmonrt~')or"import"in c:sys.setrecursionlimit(1) sys.modules['sys'],sys.modules['os']=None,None;del sys;f=lambda\ [Try it online!][TIO-j5agnb6h] [Python 2]: https://docs.python.org/2/ [TIO-j5agnb6h]: https://tio.run/##VY5BDoMgEEX3noK4KJBYkjZd2XiFXkCNtYDpGGAI4MJNr04xXXXzJ//NZP73e3qju@YM1mNIJO6xkl1dixXBMfTasWlawOhp4iLoWTEuojeQGB0c5f2tHXkFC4k6McnPx6DkxFkj2n6cn1ItsFp0IX0ox1D/UmpwRLYlSpT7oOUWIqAzYMvbC6@OhUW1GR17Wgwdmz@EhXQPdLo55K60OWrfl87M9qXmIecv "Python 2 – Try It Online" ## What does this do? For the purposes of helping you out a bit I'll explain what this does. This code opens the source file and checks if the remainder of the code fits the following criteria: * Does not contain the string `import` * Is made solely of the characters <code> &)(,.:[]a`cdfijmonrt~</code> If it fails either criterion the recursion limit is set to `1` meaning that any code you write will hit the recursion limit. There are no tricks here, I have written a solution that uses only these characters and no imports, I'm not doing anything subversive, but I will say that I think this will be pretty hard to crack. To save you some time here is a short list of useful things you cannot do with this restriction - `+` well duh, - `eval`/`exec` Wasn't going to let you get away with that - Numbers, They might be more useful than you think - String literals - `len` - `=`, No assigning variables - `>`,`<`,`==`. . . I have left you with no comparisons - `*`,`-`,`/`,`%`,`^`,`|`,`>>`,`<<` The only operators available are `~` and `&` - `__foo__`, None of those fancy double underscore methods are allowed.