gpt4 book ai didi

python - 如何在前一个字符串Python的末尾打印字符串

转载 作者:太空宇宙 更新时间:2023-11-03 13:03:17 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
How to print in Python without newline or space?
How to print a string without including ‘\n’ in Python

我有一个看起来像这样的代码:

  print 'Going to %s'%href
try:
self.opener.open(self.url+href)
print 'OK'

当我执行它时,我明显得到两行:

Going to mysite.php
OK

但想要的是:

Going to mysite.php OK

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com