deeplearning-cv-notes
deeplearning-cv-notes copied to clipboard
Python基础补充
print 输出内容到文件
year = 1
years = 5
bj = 10000
rate = 0.05
f = open("./source/interest.bak", 'w+')
while year < years:
bj = bj * (1 + rate)
print("第{0}年,本金息总计{1}".format(year, bj), file=f)