2024-07-01 07:07:24 发布
网友
我目前正在尝试执行此操作,但我的类书籍没有显示任何与布尔变量相关的内容,也没有显示任何与此问题相关的内容。我已经在网上找了一段时间了,每件事都太复杂了,不适合那些根据单位应该简单的事情。如果解决方案发布在这里,输入什么来查找它?也许我需要重新表述我的问题。你知道吗
https://i.stack.imgur.com/RMSEx.png
def getSecondWord(sentence): res = sentence.split(' ')[1] if res.endswith('.'): return res[:-1] else: return res inputSentence = 'broccoli is delicious' secondWord = getSecondWord(inputSentence) print("second word is:", secondWord)
相关问题 更多 >
编程相关推荐