小编San*_*der的帖子

输出到文本文件

如何将以下代码打印到.txt文件

y = '10.1.1.' # /24 network, 
for x in range(255):
    x += 1
    print y + str(x) # not happy that it's in string, but how to print it into a.txt
Run Code Online (Sandbox Code Playgroud)

有复制粘贴,但宁愿尝试更有趣的东西.

python text

2
推荐指数
1
解决办法
243
查看次数

标签 统计

python ×1

text ×1