def is_string(val): """Determine if a Python value seems to be a string.""" # Is there a better way to implement this? return type(val) == type('')