You can also mix things up... >>> for {}[(),...,()], x in a: ... print(x) ... Hello Satan >>>
-
-
Show this thread
-
>>> a = [(0, 'Hello'), (1, 'Satan')] >>> for (lambda:()).foldl,x in a: ... print(x) ... Hello Satan >>>
Show this thread -
New conversation -
-
-
For what it's worth, if you want to write code like this, you should take my compilers course ;-). A huge discussion (and design problem) centers around the concept of lvalue and rvalue expressions in assignment operations. This is a diabolical lvalue.
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I made sg "useful" with it: ᚐ = type('ᚐ',(object,),{'ᚐ':{},'__getattr__':lambda s,a:s.ᚐ[a],'__setattr__':lambda s,a,v:s.ᚐ.__setitem__(a,s.ᚐ[a]+v)if a in s.ᚐ else s.ᚐ.__setitem__(a,v)})() for ᚐ.i, ᚐ.s in [(600, 'sa'), (60, 'ta'), (6, 'n')]: pass print(ᚐ.i, ᚐ.s)
-
Non-minified source code athttps://gist.github.com/bmispelon/739f5baae2d0ead8aa8de52884405c95 …
- 6 more replies
New conversation -
-
-
What sorcery is this?
-
Python.
- 5 more replies
New conversation -
-
-
-
It looks better from the other side of the monitor.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.