Skip to content

Instantly share code, notes, and snippets.

@garybradski
Created October 15, 2017 23:52
Show Gist options
  • Select an option

  • Save garybradski/8ac7a9ad2c5a63cff22702c4cf484fcc to your computer and use it in GitHub Desktop.

Select an option

Save garybradski/8ac7a9ad2c5a63cff22702c4cf484fcc to your computer and use it in GitHub Desktop.
writing zero filled numerically sequential files
def rect_files(start,stop):
startstop = range(start,stop)
for i in startstop:
openstr = "%09d.txt"%(i) #zero justify out to 9 places
file = open(openstr,"w")
file.write("[ 0, 0, 0, 0 ]")
file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment