操作字符串,使用StringIO #!/usr/bin/python # -*- coding: utf-8 -*- from io import StringIO f = StringIO() f.write('hello') print(f.getvalue ...
確定! 回上一頁