当前位置:首页>开发>正文

python怎么隔行输出

2024-06-29 19:22:20 互联网 未知 开发

python怎么隔行输出?

python怎么隔行输出

对于Python2 在print语句的最后加一个逗号,就能不打印出换行符 print 'hello',print 'world'对于Python3 可以设置end参数为空字符串 print('hello', end='')

随便看看