Title.split() 是 Python 中的一个字符串方法,用于将一个字符串按照指定的分隔符拆分成多个子字符串。
例如,假设有一个字符串 Title
,值为 "The Great Gatsby",你可以使用 split() 方法将其按照空格拆分成两个子字符串:
title = "The Great Gatsby"
words = title.split()
print(words) # ['The', 'Great', 'Gatsby']
Title.split() 是 Python 中的一个字符串方法,用于将一个字符串按照指定的分隔符拆分成多个子字符串。
例如,假设有一个字符串 Title
,值为 "The Great Gatsby",你可以使用 split() 方法将其按照空格拆分成两个子字符串:
title = "The Great Gatsby"
words = title.split()
print(words) # ['The', 'Great', 'Gatsby']