When I debug my code, the changes happen, but when I open the file, nothing was changed.
Code
from ofxparse import OfxParser
from datetime import datetime as dt
# opening ofx file
with open('/home/jovani/Downloads/ofx.ofx') as file:
# Parser
ofx = OfxParser.parse(file)
#finding transactions
transactions = ofx.account.statement.transactions
now = dt.now() # I'll use this id like
for fitid in transactions: #performing changes and it happens
fitid_before = fitid.id
fitid_after = now.strftime("%Y%m%d%f")
fitid = fitid_after
Afterward, nothing was changed in ofx.ofx file.
You are asking why the file was not changed.