isinstance with string representing types
isinstance with string representing types Question: isinstance("my string", "str | int") isinstance("my string", "list") Is there a way to check the type of a variable ("my string" in this case) based on a valid type which is stored as a string? I don’t need to import the type, I know it’s builtin (int / str …