Python Forum

Full Version: Python almost as verbose as Java
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At least according to these guys.
Eh? The Python solution is 3/4 the size of the Java solution.
Shorter, AND more legible. I'd call that a win for python... even if it does rely on non-standard libs (...why not build a lib that does it on import, and then just "import g" to have the shortest answer?).
That is quite a nice code golf challenge with lots of different results, no need to reduce it to good ol' Java-vs-Python
(Dec-01-2016, 11:25 PM)ichabod801 Wrote: [ -> ]Eh? The Python solution is 3/4 the size of the Java solution.

Yes, but far more verbose than the others... (okay, they didn't include Cobol).

(Dec-02-2016, 03:07 PM)Kebap Wrote: [ -> ]That is quite a nice code golf challenge with lots of different results, no need to reduce it to good ol' Java-vs-Python

What Java-vs-Python? My post was putting them in the same bag :)
Now there's a thought, you have pypy (python written in python) imagine cobpy (Cobol in python)
I will admit to writing reports in Cobol back in the late 60's. It took about 200 punched cards
to write 'Hello world' (but of course 'Hello World' didn't exist back then as a language test)
Never liked it, but even Latex hadn't been written yet.