我有一个带坐标的点列表,如下所示:
[(0,1),(2,3),(7,-1) and so on.]
Run Code Online (Sandbox Code Playgroud)
什么是Pythonic迭代它们并每次选择三种不同的方法?我找不到比使用这样的三个for循环更简单的解决方案:
for point1 in a:
for point2 in a:
if not point1 == point2:
for point3 in a:
if not point1 == point3 and not point2 == point3:
Run Code Online (Sandbox Code Playgroud)
所以我在寻求帮助.