print函数end参数的作用

print函数默认会在末尾添加一个换行符(‘ ’)

加入end=''参数后,不会在末尾添加换行符,而是在末尾添加一个空字符串,end等于什么就会在末尾添加什么

这个只在python3中有效

原文地址:https://www.cnblogs.com/z-x-y/p/9852000.html