Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
One line solution in Clear category for Solution for Anything by lezeroq
def checkio(anything):
return type('A', (object, ), dict((('__%s__' % op), lambda *a, **b: True) for op in ('eq', 'ne', 'gt', 'ge', 'lt', 'le')))()
if __name__ == '__main__':
import re
import math
assert checkio({}) != [], 'You'
assert checkio('Hello') < 'World', 'will'
assert checkio(80) > 81, 'never'
assert checkio(re) >= re, 'make'
assert checkio(re) <= math, 'this'
assert checkio(5) == ord, ':)'
print('NO WAY :(')
May 5, 2015
Comments: