Created
February 5, 2013 17:33
-
-
Save hcwiley/4716091 to your computer and use it in GitHub Desktop.
usage: $ python ledFormat.py 110100111010
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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