python怎样隔一个字符输出?由于Python2和Python3的输出有差别,所以在这里离别以Python2和Python3为例:
python3:到场end= ' '参数。
python2:以逗号末端。 两个例子以下:
>>> a = [1, 2, 3, 4]
相干引荐:《Python视频教程》
python3编译环境
>>> for i in a: print(i, end=' ') 1 2 3 4
python2编译环境
>>> for i in a: print i, 1 2 3 4
以上就是python怎样隔一个字符输出的细致内容,更多请关注ki4网别的相干文章!