python3中print(string,end='')中,end=的作用

a = 'science'
for each in a:
    #print(each) #s /n c /n i /n e  /n n /n c /n e /n
    print(each,end='') #输出science end=参数不设置,默认为末尾换行/n,end=''末尾为空所以不换行


猜你喜欢

转载自blog.csdn.net/u010472858/article/details/80717812