Python 給咱們提供的官方module有io.StringIO 例如: from io import StringIO s = StringIO() s.write("Yes\nYEs") s.seek(0) #
確定! 回上一頁