인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

한수현's profile image
한수현

asked

Getting Started with Programming: Introduction to Python (Inflearn Original)

How to use Python Print (1-1): Let's print various things.

문자 자르기

Written on

·

153

0

문자같은경우

print('{:10.5}'.format('python study')) 이렇게 하면 문자가 중간에 잘리는데 숫자같은 경우 같은방법으로 

print('{:4.3}'.format(4223424)) 이렇게 하니까 안되네요. format괄호 안의 숫자에 따옴표를 붙여줘야 하나요?

python

Answer 1

0

niceman님의 프로필 이미지
niceman
Instructor

https://andamiro25.tistory.com/16

위에 링크를 참조하시면 숫자형 format 변환 패턴 사용에 대해서 이해가 쉬우실 겁니다.

한수현's profile image
한수현

asked

Ask a question