# Use types.FunctionType >>> import types >>> types.FunctionType <class 'function'> >>> def f(): pass >>> isinstance(f, types.FunctionType) True >>> isinstance(lambda x : None, types.FunctionType) True