I'm trying to get pyton execute this, but it keeps showing EOL err, where is the mistake in here?
exec("a = \"def f(s):\n try:\n exec(s)\n except: Exception\n print('Error')\"\nb = \"while True: f(input(''))\"\nexec(a)\nexec(b)")
This code is result of me trying to merge these two exec lines into 1, maybe there is better way to do it, there are those two exec lines:
exec("def f(s):\n try:\n exec(s)\n except: Exception\n print('Error')")
exec("while True: f(input(''))")