[英]Looping through data in a CSV file in order to output '1' and '0' to a text file (Python)
[英]Python File Output, Looping, and Increasing
number = 1
name = 'Frames' + str(number) + '.html'
usedNumbers = []
if number in usedNumbers:
number += 1
else:
open(name,'w')
在“數字”增加1的情況下,我將如何處理?將html文檔放到18,然后在19之前停止? (“Frames1.html。Frames2.html,...,Frames18.html”)
for i in range(1, 19): if i in usedNumbers: pass else: open(name, "w")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.