是否可以将片段数组设置为[x,y]变量。例如,片[[x1,y1],[x2,y2],....]
以下是我的代码:
piece = [[387,500] , [247,499] , [120,496] , [533,488] , [191,432] , [464,432],[328,426] , [50,426]]
if (292<x<350) and (390<y<450) in piece:
print("do something")
答案 0 :(得分:2)
for x, y in piece:
if (292<x<350) and (390<y<450):
print("do something")