Skip to content

Instantly share code, notes, and snippets.

@hcwiley
Created February 5, 2013 17:33
Show Gist options
  • Save hcwiley/4716091 to your computer and use it in GitHub Desktop.
Save hcwiley/4716091 to your computer and use it in GitHub Desktop.
usage: $ python ledFormat.py 110100111010
import sys
str = sys.argv[1]
i = 0
out = ""
for c in str:
i += 1
out += c
if i % 4 == 0:
out += "\n"
print(out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment