SyntaxFix
Write A Post
Hire A Developer
Questions
Sometimes you just want a simple one liner:
binary = ''.join(['{0:08b}'.format(ord(x)) for x in input])
Python 3