사용자 도구

사이트 도구


python:string:format

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
python:string:format [2015/06/17 23:11]
kwon37xi
python:string:format [2016/01/10 03:43] (현재)
kwon37xi
줄 1: 줄 1:
 ====== Python String format ====== ====== Python String format ======
 +  * [[https://zerokspot.com/weblog/2015/12/31/new-string-formatting-in-python/|TIL: New String Formatting in Python]]
   * [[http://docs.python.org/library/string.html|7.1. string — Common string operations]] : "string".format()   * [[http://docs.python.org/library/string.html|7.1. string — Common string operations]] : "string".format()
  
   * [[http://docs.python.org/release/2.5.2/lib/typesseq-strings.html|% String Formatting operation Map 기반]]<code python>   * [[http://docs.python.org/release/2.5.2/lib/typesseq-strings.html|% String Formatting operation Map 기반]]<code python>
-print '%(language)s has %(#)03d quote types.'+print '%(language)s has %(#)03d quote types.' % {'language': "Python", "#": 2}
-          {'language': "Python", "#": 2}+
 # Python has 002 quote types. # Python has 002 quote types.
 </code> </code>
python/string/format.1434550308.txt.gz · 마지막으로 수정됨: 2015/06/17 23:11 저자 kwon37xi