我正在为Telegram编写一个小型机器人,并收到此错误:
这是我的代码:
track=['tryp','']
def main():
global track
print (type(track))
text = 'ewqtd rqrq tryp'
x = text.split()
for l in x:
if track.count(l) == False:
track = track.append(l)
print("Записано слово " + l)
print(track)
if __name__ == '__main__':
main()