Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I got a really crazy one-liner:

    ''.join([chr(int(z1 + z2, 16)) for _, ((_1, z1), (_2, z2)) in groupby(enumerate(ciph), key=lambda (i, y): i // 2)])
edit: my goal was not to do indexing explicitly


Nice. Do you import itertools in your .pythonrc or was it just already in your shell?

itertools is one of my favorite python modules.


I imported it. So I guess it's not a technical one-liner




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: