String Replace
1. replace(old, new, count) -> replace("찾을값", "바꿀값", 바꿀횟수)xtext = '123,456,789,999'replaceAll= text.replace(",","")replace_t1 = text.replace(",", "",1)replace_t2 = text.replace(",", "",2)replace_t3 = text.replace(",", "",3)print("결과 :")print(replaceAll)print(replace_t1)print(replace_t2)print(replace_t3)'''결과 : 123456789999123456,789,999123456789,999123456789999''' 2. 우측부터 변경법 xxxxxxxxxxdef re..
리스트안에서 서로 대응 튜플 만들기 ( 중복 없이)
import itertools as itprint(list (range(groups.size)) )'''[0,1,2,3,4]'''combs = it.combinations(range(groups.size), 2)list(combs)'''[(0,1), (0,2), (0,3), (0,4), (1,2), (1,3), (1,4), (2,3), (2,4), (3,4)'''