Python | end parameter in print()

# This Python program must be run with 
# Python 3 as it won't work with 2.7. 

# ends the output with a <space> 
print("Welcome to" , end = ' ') 
print("GeeksforGeeks", end = ' ') 
Welcome to GeeksforGeeks
# This Python program must be run with 
# Python 3 as it won't work with 2.7. 

# ends the output with '@' 
print("Python" , end = '@') 
print("GeeksforGeeks") 
Python@GeeksforGeeks
发布了163 篇原创文章 · 获赞 90 · 访问量 6297

猜你喜欢

转载自blog.csdn.net/weixin_45405128/article/details/104089968