Changes between Version 3 and Version 4 of Python/Snippet/数値と文字列


Ignore:
Timestamp:
09/20/06 01:35:05 (13 years ago)
Author:
nakiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python/Snippet/数値と文字列

    v3 v4  
    8989print string.strip(msg) 
    9090}}} 
     91== 文字列バッファ == 
     92{{{ 
     93#!python 
     94import StringIO 
     95 
     96f = StringIO.StringIO() 
     97for n in range(4): 
     98  f.write(str(n) + '\n') 
     99 
     100f.seek(0) 
     101print f.read() 
     102}}}