Skip to main content
added 4 characters in body
Source Link
seequ
  • 1.7k
  • 1
  • 11
  • 21

Python 2.x (single expression)

Python (single expression)

Python 2.x (single expression)

added 108 characters in body
Source Link
seequ
  • 1.7k
  • 1
  • 11
  • 21

Now, while this is quite easy to figure out for Pythoneers, others might find it at least interesting. If you wonder why there's so many lambdas, I wanted to have maximum underscoreness, but minimal repetition. Who doesn't love underscores? Ideone

Now, while this is quite easy to figure out for Pythoneers, others might find it at least interesting. Who doesn't love underscores? Ideone

Now, while this is quite easy to figure out for Pythoneers, others might find it at least interesting. If you wonder why there's so many lambdas, I wanted to have maximum underscoreness, but minimal repetition. Who doesn't love underscores? Ideone

added 1097 characters in body
Source Link
seequ
  • 1.7k
  • 1
  • 11
  • 21

This defines a function and calls it with 'Just another Python Hacker'. Now, it didn't have to be a function, but I thought it would be more elegant.

f = (lambda ______________:(lambda ______,_______,________:(lambda _____:(lambda _,___,__,____,_____________:(lambda _________,__________:(lambda ___________,____________:___________(____________,____[_________**(_________+__________)-__________::_________+_________+_________]+_[__________::_________]+__[_________+__________])(____________,______________))((lambda _,__:________(______(_))[__]),(________(__import__(_[_________]+__[_________*_________+__________]+_[_________]))[_[_________:_________+_________]+___[__________/_________]+__[__________]+_____(u'')[__________/_________]+_[_________+__________]])))((_____________(_)+_____________(_))/_____________(_),_____________(_)/_____________(_)))(_____([]),_____({}),_____(None),_____({}.__iter__),lambda _:len(_)))(lambda _:_______(______(_))))((lambda _:_.__class__),(lambda _:_.__name__),(lambda _:_.__dict__)))
f('Hello.\n')
f('Just another Python Hacker here.\n')

This defines a function and calls it with 'Just another Python Hacker'. Now, it didn't have to be a function, but I thought it would be more elegant.

f = (lambda ______________:(lambda ______,_______,________:(lambda _____:(lambda _,___,__,____,_____________:(lambda _________,__________:(lambda ___________,____________:___________(____________,____[_________**(_________+__________)-__________::_________+_________+_________]+_[__________::_________]+__[_________+__________])(____________,______________))((lambda _,__:________(______(_))[__]),(________(__import__(_[_________]+__[_________*_________+__________]+_[_________]))[_[_________:_________+_________]+___[__________/_________]+__[__________]+_____(u'')[__________/_________]+_[_________+__________]])))((_____________(_)+_____________(_))/_____________(_),_____________(_)/_____________(_)))(_____([]),_____({}),_____(None),_____({}.__iter__),lambda _:len(_)))(lambda _:_______(______(_))))((lambda _:_.__class__),(lambda _:_.__name__),(lambda _:_.__dict__)))
f('Hello.\n')
f('Just another Python Hacker here.\n')
Source Link
seequ
  • 1.7k
  • 1
  • 11
  • 21
Loading