打造一個000-999的字典
for i in range(1000): if i<10: i = '00'+str(i) elif 10<=i and i<100: i ='0'+str(i) else: i=str(i) with open('1.txt', 'a') as f: f.write(i+"\n")
打造一個000-999的字典
for i in range(1000): if i<10: i = '00'+str(i) elif 10<=i and i<100: i ='0'+str(i) else: i=str(i) with open('1.txt', 'a') as f: f.write(i+"\n")
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。