-1
您好我想提出一個腳本,如:的數學運算Python腳本不能正常工作
for x in lst_HandS:
a=lst_HandS[0]
lstexpG.append(math.exp(-x+a)/RT_energy)
lstGexpG.append(x*math.exp(-x+a)/RT_energy)
和終端的回報:
Traceback (most recent call last):
File "scripts4/thermo-analisis-de-datos.py", line 64, in <module>
lstexpG.append(math.exp(-x+a)/RT_energy)
TypeError: bad operand type for unary -: 'list'
我與編程初學者,不知道是什麼手段。你能幫我嗎?
'-'只在'-x'前面,這意味着'x'是一個列表。你不能得到一個負面的名單。 –