SEP和END参数()语句
我目前正在使用Python 3.9.6版本,并且在使用“ SEP =”的print()语句作为参数时,我会收到语法错误。
我的“ SEP”参数的代码是: 打印(“ John”,“ Sam”,“ Michael”,Sep =“ - ”)
我的“ end”参数的代码是: 。
我不明白我的代码问题是什么 请帮助
请找到两个代码的附件片段:在此处输入image Description
预先感谢!
I am currently using Python 3.9.6 version and while using the print() statement with "sep=" as an argument, i am getting the syntax error.
My code for "Sep" Argument is:
print("John","Sam","Michael",sep="-")
My code for "End" Argument is:
print("John","Sam","Michael",end="-")
I don't understand what's the problem with my code. Please help
Please find the attached snippet of both the codes:enter image description here
Thanks in advance!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试使用
结束
。例如:
打印(“ John”,“ Sam”,“ Michael”,End =“ - ”)
Try using
end
.Ex:
print("John","Sam","Michael",end="-")
尝试以下操作:
try this :