-
eval함수TIL(today i learned)/python 2023. 2. 24. 18:15
eval함수란 문자열 안에있는 식을 계산해주는 함수이다
ex)백준2863
a=input().replace(' ','+').replace('6','5') print(eval(a),eval(a.replace('5','6')))
'TIL(today i learned) > python' 카테고리의 다른 글
divmod함수 (0) 2023.02.25 ord (0) 2020.09.03 리스트안에 튜플 넣기 (0) 2020.09.01 in 연산자 (0) 2020.08.30