[lang-ref] ( is_tuple_allows_size_1 ) ( python )
def test_is_tuple_allows_size_1():
# Yes
r1 = (1,) # for a 1-tuple, add a trailing comma
r2 = (1) # parentheses only: just an int
assert type(r1) is tuple
assert type(r2) is int
def test_is_tuple_allows_size_1():
# Yes
r1 = (1,) # for a 1-tuple, add a trailing comma
r2 = (1) # parentheses only: just an int
assert type(r1) is tuple
assert type(r2) is int