The expression (a, b) makes a tuple of two values. Putting the whole hours first gives callers a predictable order for unpacking.
def book_ends(word):
return (word[0], word[-1])
first, last = book_ends("north")
print(first, last) # n hThe tuple carries two answers in a documented order. Each caller can unpack both with one assignment.
Return a pair containing whole hours and remaining minutes for a nonnegative integer number of minutes.