counter, for loop

for loop中使用counter
t_acct={
101:"Cash",
102:"Accountas Receivable",
201:"Accounts Payable",
202:"Notes Payable",
301:"Commnon Stock",
302:"Retained Earnings"

}
i=0
for key in t_acct:
print(f"{i}: The key is {key} and the value is {t_acct[key]}")

i = i+1
0: The key is 101 and the value is Cash

1: The key is 102 and the value is Accountas Receivable
2: The key is 201 and the value is Accounts Payable
3: The key is 202 and the value is Notes Payable
4: The key is 301 and the value is Commnon Stock
5: The key is 302 and the value is Retained Earnings

分别在“for key in t_acct: ”前后加上“i=0”和“i=i+1”,怎么理解这种表达,或者我应该网上搜索学习哪方面的知识

=是赋值,i=0就是将i变量赋值为0,i=i+1,就是i赋值为i+1(i=0,i+1=1,那么就是i赋值为1),也就相当于i的值+1