📜  如何在 python 列表中找到三个数字的排列 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.445000             🧑  作者: Mango

代码示例1
if __name__ == '__main__':
    x = int(input())+1
    y = int(input())+1
    z = int(input())+1
    n = int(input())
    variable = []
    for i in range(0,x):
        for j in range(0,y):
            for k in range(0,z):
                if ( i+j+k) != n:
                    variable.append([i, j, k])
print(variable)