Advertisement
Guest User

comboita 5 digit

a guest
Oct 11th, 2018
1,114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. #this program generate all number of 5 digits from 00000 to 99999
  2. #made by comboita
  3.  
  4. from tkinter import Tk
  5. from tkinter.filedialog import asksaveasfilename
  6. import time
  7.  
  8.  
  9.  
  10.  
  11.  
  12. print("\nChoose where to save the file")
  13. time.sleep(1)
  14. path = asksaveasfilename(confirmoverwrite=False ,   initialdir = "/Desktop",title = "Select file",filetypes = (("txt files","*.txt"),("all files","*.*")))
  15.  
  16.  
  17. outfile = open(path, "w")
  18.  
  19.  
  20. for num in range(1000):
  21.     outfile.write("%s:%s\n"%(str(num).zfill(3),str(num).zfill(3)) )
  22.    
  23. print("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement