UniCoreFW

is_string()

Check if obj is a string.

Implementation

Args: obj: The object to check Returns: True if obj is a string, False otherwise

Example

is_string('hello')

Expected output: True

Source Code

def is_string(obj: Any) -> bool: return isinstance(obj, str)