What's the most elegant piece of code you have encountered in your life (in any language)?
No matter how experienced we are, we should keep reading others' code. Because there are people who are way smarter than us. In this process I have found many awesome pieces of code that have taught me new ways to deal with specific coding challenges.
Have you encountered any such coding tricks in the beginning of your career or anytime while writing code ?