Solution 1

def one_element_tuple(arg):
    return (arg, )

Create a one element tuple

The function one_element_tuple currently returns the value None. Modify it to return a tuple containing just 1 element, the one passed as a parameter:

one_element_tuple('a')  # ('a', )
one_element_tuple(9)    # (9, )

Test Cases

test with integer - Run Test

def test_with_integer():
    assert one_element_tuple(7) == (7, )

test with string - Run Test

def test_with_string():
    assert one_element_tuple('rmotr') == ('rmotr', )
def one_element_tuple(arg): return None