Solution 1

# Complete the following operations
pro_in_programming = "pro" in "programming"

w_in_bridge = "w" in "bridge"

In or out

The in keyword is used to determine if something is part of something else.

For now, we can use it to check if a letter or string is part of another string.

print('c' in 'cat') # True
print('z' in 'dog') # False
print('ham' in 'hamster') # True

Use the in keyword to complete the following statements.

Test Cases

test in or out - Run Test

def test_in_or_out():
    assert pro_in_programming is True
    assert w_in_bridge is False
# Complete the following operations pro_in_programming = ? w_in_bridge = ?