ex26.py fixed