Run
obj = 'apple' obj_type = type(obj) if obj_type is str: print('Object is a string.') else: print('Object is not a string.')
Output