0
所以我寫了一個整數.txt文件是這樣的:檢索從Python中的.txt文件一個整數,並將其賦值給一個變量(初級)
dolyen = int(input("Enter exchange rate: "))
filedolyen = open("dolyen.txt","w")
filedolyen.write("%s" % dolyen)
filedolyen.close()
然後我試圖複製從該文件中的另一段代碼的數目:
yendol1 = open("yendol.txt","r")
print(value * yendol1,"Dollars")
上從文件分配號碼給一個變量任何幫助,將不勝感激