#本功能实现循环计倍数功能,只需要人工改变倍数设置后,就会循环执行
def getbeishu():
f_jici =r'd:\jici_tmp.txt'
beishu = [1,2,3,4,5,6,7]
fil_jici =open(f_jici,'a+')
fil_jici.write('a')
fil_jici.close()
with open(f_jici,'r')as countbeishu:
nersong = countbeishu.readline()
num = nersong.count('a')
if num
outbeishu = beishu[num-1]
return outbeishu
if num ==len(beishu):
f2 =open(f_jici,'r+')
f2.seek(0)
f2.truncate()
return beishu[-1]
xx = getbeishu()
print(xx)