Update to the latest version of python and replace any code that can be replaced with native functions