if __name__ == '__main__': print( max([-3, 3], key=lambda x: x*x) ) print( max([3, -3], key=lambda x: x*x) )
Standard input is empty
-3 3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!