The code in the book you linked is correct, but it is also python2.
If you are using python3 it would look like this:
If you are using python3 it would look like this:
>>> def print_twice(bruce): ... print(bruce, bruce) ... >>> print_twice("spam") spam spam >>> print_twice(8887) 8887 8887 >>>