python 3.0以上的版本中 用print("\t",end=' ')来阻止python的默认的自动换行,同时会进行缩进。
然后,由于我的是python 2.7的版本,python3.0版本不向下兼容,这句话系统会报错 :
print ("\t",end=' ')
^SyntaxError: invalid syntax
查了资料,发现,python 2 版本的应该使用 print “\t” , 来进行缩进。注意,在 print “\t” 后面有一个英文的逗号 “,” ,不要忘了。