But Java was an overnight success, while it took Python years to get traction. I was exposed to both around the same time, probably 1995, but I ignored Python until the second time I encountered it in 2003. It just didn't have the hype.
Java was by no means an overnight success. It was way too slow for several years until they really started to do anything more than run the bytecode in the JVM.
McNealy freely admitted in an interview that:
"we were able to hook Java runtime onto the free, open source Netscape browser. And it was a collision of two things that accelerated and launched each other together. It was fascinatingly lucky timing for both companies."
While it may have taken time to mature at that time it was an "overnight success".
Sun was considering dropping it and considered it an expense before that.
Did Sun ever make any money on it?
Python (1991) is older than Java (1995).