𝘼𝙣𝙖𝙡𝙮𝙨𝙞𝙨/ᴀʟɢᴏʀɪᴛʜᴍ

combinations

콜라맛갈비 2023. 4. 28. 23:00
728x90
from itertools import combinations, permutations

nums = [1,2,3,4]
combi = list(combinations(nums, 2))

 

 

 

 

728x90

'𝘼𝙣𝙖𝙡𝙮𝙨𝙞𝙨 > ᴀʟɢᴏʀɪᴛʜᴍ' 카테고리의 다른 글

Collections 최빈값 모듈 - most_common  (0) 2023.06.19
정수 삼각형  (0) 2023.04.29
.__contains__  (0) 2023.04.28
collections.Counter  (0) 2023.04.28
itertools-combinations, math  (0) 2023.04.28