I don't quite understand how this piece of code works:

```
def sequence_class(immutable):
    return tuple if immutable else list

seq = sequence_class(immutable=False)
s = seq("Nairobi")
s
['N', 'a', 'i', 'r', 'o', 'b', 'i']
seq = sequence_class(immutable=True)
s = seq("Nairobi")
s
('N', 'a', 'i', 'r', 'o', 'b', 'i')

```

It is quite obvious what it is doing, but I don't understand how the function can magically return the `tuple("Nairobi")` or `list("Nairobi")` just with the statement return `tuple if mutable else list` and without any parameter to the function.

Any clear explanation to this?