Revision: 36277
Updated Code
at November 20, 2010 03:32 by vyahhi
Updated Code
binary_int = lambda i, c = (lambda i, c: i and (c(i >> 1, c) + str(i & 1)) or ''): c(i, c) binary_str = lambda s: ''.join([binary(ord(ch)) for ch in s]) print binary_str('hello world')
Revision: 36276
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 20, 2010 03:29 by vyahhi
Initial Code
binary = lambda i, c = (lambda i, c: i and (c(i >> 1, c) + str(i & 1)) or ''): c(i, c) s = 'hello world' ''.join([binary(ord(ch)) for ch in s])
Initial URL
Initial Description
Initial Title
String to binary
Initial Tags
Initial Language
Python