"Python 문자열 format()"의 두 판 사이의 차이

(새 문서: ==개요== ;Python 문자열 format() <source lang='python' run> print(a,b,c,d,e) print("{} {} {} {} {}".format("a","b","c","d","e")) </source> ==같이 보기== * Python 문자...)
 
 
(다른 사용자 한 명의 중간 판 3개는 보이지 않습니다)
2번째 줄: 2번째 줄:
;Python 문자열 format()
;Python 문자열 format()


==예제==
<source lang='python' run>
<source lang='python' run>
print(a,b,c,d,e)
print("a","b","c","d","e")
print("{} {} {} {} {}".format("a","b","c","d","e"))
print("{} {} {} {} {}".format("a","b","c","d","e"))
</source>
=={자료형}.format(인수)==
<source lang='python' run>
age=2; name = 'ZETAWIKI'
print("The {0} is {1} years old.".format(name,age))
</source>
</source>


==같이 보기==
==같이 보기==
* [[Python 문자열]]
* [[Python 문자열]]
 
* [[데이터과학 치트시트]]


[[분류: Python 문자열]]
[[분류: Python 문자열]]

2020년 2월 8일 (토) 10:55 기준 최신판

1 개요[ | ]

Python 문자열 format()

2 예제[ | ]

print("a","b","c","d","e")
print("{} {} {} {} {}".format("a","b","c","d","e"))

3 {자료형}.format(인수)[ | ]

age=2; name = 'ZETAWIKI'
print("The {0} is {1} years old.".format(name,age))

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}