I don’t think dynamic languages like python/ruby/php (I know there have been improvements regarding type checking, still) should be used anymore in the face of ai-generated code. The advantages of these kind of languages are not as relevant as before
One of the guiding principles of Python's design was "code is read much more often than it is written". Today, that's more true than ever.