摘要: with open('1.txt',"w") as fff: print(fff) 测试print()函数的file参数时,不小心弄出来一个<_io.TextIOWrapper name='1.txt' mode='w' encoding='cp936'> 才知道原来‘GB2312’原来是系统中第9 阅读全文
posted @ 2023-04-13 13:22 etfolin 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 如果print的end参数只要不是换行,默认就会攒到换行再一起输出。 除非flush设置为True,那么就不换行也输出了。 除了做这个加载器,还有什么用处呢? # 来自菜鸟的example import time print(" RUNOOB EXAMPLE : Loading 效果 ") prin 阅读全文
posted @ 2023-04-13 12:29 etfolin 阅读(49) 评论(0) 推荐(0) 编辑