Multiple Results

Learn how we can implement multiple functions like prepare_group and find_relatives.

Passengers may not only have a single sibling, spouse, parent, or child. They can have many. For instance, the Carter family, where the father is Mr. William Ernest Carter, consists of the parental couple and two children.

Before we see what happens, let’s further structure our code. We define the prepare_group function. It takes a PassengerId ...