Importing chapter18 work

Code from chapter 18 works under python3