Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
python 숫자 출력에서 천(1000) 단위마다 콤마를 출력 본문
python 숫자 출력에서 천(1000) 단위마다 콤마를 출력
1. format 지정 - 파이썬 2.7 이상value = 123456789 print "{:,}".format(value)
import locale print locale.setlocale(locale.LC_ALL, 'en_US') print locale.format("%d", 123456789, grouping=True)
'랭귀지 > python' 카테고리의 다른 글
[PYTHON] exit 함수 : 프로그램 종료하기 (0) | 2018.11.17 |
---|---|
pyQt5 QLineEdit 패스워드설정 (0) | 2018.11.16 |
pyqt spinbox set value (0) | 2018.11.13 |
파이썬 스케줄러를 지속적으로 돌리기위한 방법{python threading} (0) | 2018.11.12 |
python round를 이용한 소수점 반올림 (0) | 2018.11.11 |
Comments