Skip to content

Instantly share code, notes, and snippets.

@kryskool
Created June 4, 2013 08:36
Show Gist options
  • Save kryskool/5704515 to your computer and use it in GitHub Desktop.
Save kryskool/5704515 to your computer and use it in GitHub Desktop.
generate a header for file with fixed length
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