How To Close Python Program With Functions