Update and rename ex40.md to ex40.py