파이썬

[파이썬] 기초 - 문자열 활용

hisohyun 2021. 4. 28. 11:16

m.blog.naver.com/PostView.nhn?blogId=zlatmgpdjtiq&logNo=221300376523&proxyReferer=https:%2F%2Fwww.google.com%2F

 

Python 기초 11: 문자열 활용-2 [ join & center & ljust & rjust & zfill ]

안녕하세요 ~! 이번글에서는 join() ~ zfill() 까지 할거에요!. 지난글에서 했던 upper() ~ splitlines() ...

blog.naver.com

center()

칸수를 체울때 사용합니다

st.center(칸수,체울값)

ljust()

왼쪽부터 칸수확보

st.ljust(칸수,체울값)

rjust()

오른쪽부터 칸수확보

st.rjust(칸수,체울값)