Skip to content

Instantly share code, notes, and snippets.

@fathat
fathat / triangle.py
Created May 27, 2011 23:12
Infinitely prints fractal triangles using only one root expression and no statements.
(lambda:
not globals().__setitem__('sys', __import__('sys'))
and not globals().__setitem__('this', sys.modules[globals()['__name__']])
and not globals().__setitem__('time', __import__('time'))
and
#program
[setattr(this, k, v) for k,v in {
'set_color': (lambda c: w(['*', ' '][c])),
'abs': (lambda t: (t + (t >> 31)) ^ (t >> 31)),
'w': sys.stdout.write,