Create a function that takes a function func and counts its arguments. Examining a function's bytecode using __code__ is disabled.
num_args(lambda: "") ➞ 0
num_args(lambda x: "") ➞ 1
num_args(lambda x, y: "") ➞ 2
+, -, *, and /.func will have default values.__code__.__code__ or removing function functionality is too harsh, feel free to leave a comment.