+ 11

can any (python) program be written as 1-liner?

Up to now most challenges got at least one answer as 1-liner. i asked myself, if there is any Challenge that cant be done with one line. if yes, which attributes does this prog have? except: interactive programs like eliza...

25th Oct 2017, 8:27 AM
Oma Falk
Oma Falk - avatar
3 odpowiedzi
+ 3
Not only it DOES but it SHOULD ! Ok more seriously using functional programming you can code anything as a function. Google turing complete and functional programming.
25th Oct 2017, 11:51 AM
VcC
VcC - avatar
+ 4
@VcC so the answer is yes for all languages serving l functional programming.
25th Oct 2017, 12:31 PM
Oma Falk
Oma Falk - avatar
+ 1
Even for non functionnal languages google IOCCC for gmorious examples in C
25th Oct 2017, 1:41 PM
VcC
VcC - avatar