Python code written by me.