solutions

Is string

Define a function is_string that receives a variable and if it is a string
returns True and if not returns False.

Hint: Use the isinstance function.

Examples:

>>> is_string('happy')
True
>>> is_string(27)
False

Test Cases

test string - Run Test

def test_string():
    assert is_string('happy') is True

test integer - Run Test

def test_integer():
    assert is_string(27) is False