>>> message = "This is a simple string."
>>> print(message)
This is a simple string.
>>> message = "This is another simple string."
>>> print(message)
This is another simple string.
>>> name = "sherlock holmes"
>>> print(name.title())
Sherlock Holmes
>>> print(name.upper())
SHERLOCK HOLMES
>>> print(name.lower())
sherlock holmes
2-7 剔除人名中的空白
>>> name = "\t Sherlock Holmes\n"
>>> print(name.lstrip())
Sherlock Holmes
>>> print(name.rstrip())
Sherlock Holmes
>>> print(name.strip())
Sherlock Holmes
2-2 多条简单消息: 将一条消息存储到变量中,将其打印出来;再将变量的值修改为一条新消息,并将其打印出来。 >>> message = "This is a simple string.">>> print(message)This is a simple string.>>> message = "This is another si...