1 Line Code [Challange]
what can you do with just One and only One line of code.
heres my biggest 1 liner... it prints all subsets even with all permutation... only basic keywords used... https://code.sololearn.com/cZ41Ge58z6zk/?ref=app
here I count vowels in input: https://code.sololearn.com/cTL8373r1y9L/?ref=app but much more can be done :p
Here's mine. A simple one. https://code.sololearn.com/cjM6Pf930FqP/?ref=app
You can put everything in a single line. (exept for single line comments...) Readability is just at -5/10 So whole games could fit into a single line...
My first one-liner: https://code.sololearn.com/ciSxUtF2L9H4/?ref=app I wrote it with the knowledge SoloLearns Python-tutorial gives from its start to the using of range(). Now, after learning more Python, I understand there would have been also easier ways, but this is my first one-liner. And the only one, for now.
Juan Prieto Isn't that a little cheating? I mean, in a pure one-liner there shouldn't be more than one line, and depending on language, one semicolon, I guess. Of course you cant do it like that in Java, but I think there should be only one "fair" line of code in the main-class, when using programming languages as Java, C, C++, C#...