📌  相关文章
📜  选择字符串中的第一个单词 python 代码示例

📅  最后修改于: 2022-03-11 14:46:08.044000             🧑  作者: Mango

代码示例2
def print_first_word():
    words = "All good things come to those who wait"
    print(words.split().pop(0))
    #to print the last word use pop(-1)
print_first_word()