
Daniel G. answered 07/23/19
Software Developer / Tech Company Founder With Comp-Sci Background
The code snippets you showed achieve the same result; type() returns the type object of it's (only) argument, so
type('some string') => <class str>
whereas isinstance takes two arguments, an object and a type, and returns a boolean indicating whether is of the given type, so
isinstance('some string', str) => True