How does Python return multiple values from a function?

Since the return statement in getName specifies multiple elements: def getName(self): return self.first_name, self.last_name Python will return a container object that basically contains them. In this case, returning a comma separated set of elements creates a tuple. Multiple values can only be returned inside containers. Let’s use a simpler function that returns multiple values: def … Read more