+ 1

The best one line code ever?

18th Mar 2018, 8:12 PM
Nashik CHEF MJ (The Nashik Chef MJ)
Nashik CHEF MJ (The Nashik Chef MJ) - avatar
2 ответов
+ 10
eval(input()) #runs whatever you type as code, also is a calculator
18th Mar 2018, 9:56 PM
Ahri Fox
Ahri Fox - avatar
+ 5
Some nice one liners in python are custom map and filter functions: one_line_map = lambda F,L : [F(v) for v in L] one_line_filter = lambda F,L : [v for v in L if F(v)]
18th Mar 2018, 8:56 PM
Pedro Demingos
Pedro Demingos - avatar