Python 3 fixes for the second exercise