Created
June 4, 2013 08:36
-
-
Save kryskool/5704515 to your computer and use it in GitHub Desktop.
generate a header for file with fixed length
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
header = '' | |
max_lenght = 100 | |
for x in range(1, max_lenght): | |
if not x % 10 : | |
header += '|' | |
elif not x % 5: | |
header += '.' | |
else: | |
header += ' ' | |
header += '\n' + ((max_lenght - 1) * '-') | |
print header |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment