데이터 분석/[Python] 기초
[Python] 소수점 n 번 째 자리까지 0으로 채우기
INCHELIN
2020. 9. 21. 16:39
728x90
aa = 1.2
print(format(aa, ".2f")) # 1.20
f = format(aa, '.2f') # 1.20 >> float 형태에서 string 타입으로 변경됩니다.
728x90