Technic18 str에서 숫자와 텍스트 분리 이렇게 하면 756이랑 11 그리고 7이 분리됨 근데 \d+에서 +을 빼면 7, 5, 6 이런식으로 개별 분리됨 import re temp = '756q11b7' print(re.findall("\d+", temp)) 2021. 1. 25. Split 한 데이터의 형 변환하고 합하는거 # str to int sum(list(map(int, 변수.split("+")))) 2021. 1. 24. 변수 Reverse 시키기 변수[::-1] a = input().split() b = str(int(a[0][::-1]) + int(a[1][::-1])) print(int(b[::-1])) 2020. 11. 30. Char to int ord(character) - 97 alphabet[ord(stringData[i]) - 97] += 1 2020. 11. 27. 이전 1 2 3 4 5 다음