Why do we have to put so many lines of codes in Java and less in Python
because everything in Java is an object and in python it's not. you also deal with packages, includes and classes a lot more in java than in python. don't let the number of lines of code decide which language to learn/use. they all have their pros and cons.
I think it doesnt matter :)
JAVA is Object Oriented programming language. Whereas, Python is a scripting language.