Java and Python are high-level programming languages that are very different. Python appeared earlier than Java, as it appeared in 1991 while Java appeared in 1995. Java and Python handle variables differently. Java codes are longer than Python codes.
Usual filename extensions
.java, .class, .jar, .war
Cycle-detecting garbage collector
Introduction (from Wikipedia)
Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax",and its standard library is large and comprehensive.
Java is statically typed, and so it forces a computer programmer to define the type of a variable when he first declare it and will not allow him to change the type later in the program. Python is dynamically typed and a programmer can just use his variables as he wants to without worrying too much about their types.
Kasia Mikoluk says that Python is unusual among programming languages in that it uses indentation to separate code into blocks, while Java uses curly braces to define the beginning and end of each function and class definition. The advantage of using indentation is that it forces the programmer to set his program out in a way that is easy to read, and there is no chance of errors resulting from a missing brace.
Larry Wall says that Java codes are heavyweight and verbose. The Python website says that Python codes are 3-5 times shorter than Java codes.
Ease of use
Python is easier to use than Java because its code is shorter and the programming language is dynamically typed.