import os, base64 def showme(s): b64_1 = base64.b64encode("p" + "rint(" + s + ")") exec(base64.b64decode(b64_1)) print("This is the first test.\n") showme("This is the second test.")
Standard input is empty
This is the first test.
Traceback (most recent call last): File "./prog.py", line 6, in <module> File "./prog.py", line 3, in showme File "/usr/lib/python3.5/base64.py", line 59, in b64encode encoded = binascii.b2a_base64(s)[:-1] TypeError: a bytes-like object is required, not 'str'