Back to front pageView on Hacker News (opens in a new tab)Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years agoPreferably an elegant snippet rather than an entire (well engineered) codebase.Comments (380) 116 threadsShow all commentsShowing thread 36 of 116rectangletangle7 years ago#Transposing a matrix in Python is pretty neat. >>>list(zip(*[(1, 2, 3), (4, 5, 6), (7, 8, 9)])) [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years ago
rectangletangle7 years ago#Transposing a matrix in Python is pretty neat. >>>list(zip(*[(1, 2, 3), (4, 5, 6), (7, 8, 9)])) [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
Comments (380) 116 threads
Show all comments
Showing thread 36 of 116