问题一:
word = 'fast'
print '"',word,'" is nice'
输出为" fast " is nice
.
我如何获得输出,"fast" is nice
即我希望在之前和之后删除空格word
?
问题2:
def faultyPrint():
print 'nice'
print 'Word is', faultyPrint()
给我输出为
Word is nice
None
我想将输出作为Word is nice
并None
删除。
我不想要输出
print 'Word is'
faultyPrint()
因为它给了我输出
Word is
nice
如何在不更改功能并保持相同输出格式的情况下做到这一点?