我想要在Tkinter画布上绘制一系列坐标:
points = [(1,1), (2, 2), (3, 3), (2, 0)] # etc. This is could have 100 points or more
下一步是调用函数create_line,但它不支持list:
Canvas.create_line(1, 1, 2, 2, 3, 3) #this works ok
Canvas.create_line(points) #this doesn't work
那么,有没有一种有效的方法来分离列表中的元素,并以这种顺序将它们插入到函数中呢?如果可能的话,我希望避免使用for循环。
https://stackoverflow.com/questions/51118695
复制相似问题