조합

[참고] https://youtu.be/HYKpunR1Nto

def DFS(L, BeginWith):
	# 종료조건
    if L == r:
        print(result)
    else:
        for i in range(BeginWith, len(n)):
            result[L] = n[i]
            DFS(L + 1, i + 1)


# nCr
n = [1, 2, 3]
r = 2

result = [0] * r    # 출력할 값

DFS(0, 0)	# level:0, beginwith: 0


'''
[1, 2]
[1, 3]
[2, 3]
'''