I\'m working on a project, which contains several modules. Simplifying the problem, there is some variable x. Sometimes it may be int or float or list. But it may be a lambd
If you prefer the typing module, use Callable:
typing
Callable
In [1]: from typing import Callable In [2]: isinstance(lambda: None, Callable) Out[2]: True