代码所求:1到20之间的互为质数的勾股数,比如(3,4,5)。 list=[(3,4,5), (5,12,13), (6,8,10), (8,15,17), (9,12,15), (12,16,20)] 本代码中,遍历list[:]时,都遍历到了,可遍历list时最后一个元素(12,16,20)没有遍历到。list[:]和list有区别? def zhishu(x,y): while x!=y: if x>y: x=x-y if x<y: y = y-x if x==1: ...