ff.write("%s %s %s %s %s\n"%(xx[:6],str(int(left)),str(int(top)),str(int(right)),str(int(bottom))) 如上就可以順利執(zhí)行了,沒報(bào)TypeError: ‘float’ object is not subscriptable 原先想過,直接把str加在最后一句上,即: 1 ff.write("%s %s %s %s %s\n"%(str(score[:6]),str(int...
www.dbjr.com.cn/article/2708...htm 2025-6-6