tt9_ltd=[ [20140731, -43924],
[20140801, -46905],
[20140804, -51594],
[20140805, -46340],
[20140806, -51764],
[20140807, 10000] ]
def enter_pnl():
date_list=[]
for tt in tt9_ltd:
{date_list.append(tt[0])}
input_date=input("Please enter today's Date yyyymmdd: ")
input_pnl=input("Please enter today's PnL xxxx: ")
if int(input_date) in date_list:
{
print("Date already exists. Overwriting....")
tt9_ltd.pop(date_list.index(int(input_date)))
tt9_ltd.append([int(input_date),int(input_pnl)])
}
else:
{
tt9_ltd.append([int(input_date),int(input_pnl)])
}
return(tt9_ltd)
//
请问黄色那两行为何会导致错误/停止compiler?
新手发问,感激不尽~