python常用方法 2024-07-25 字符串12345678910111213name = 'hello world'name.title()# Hello Worldname.upper()# HELLO WORLDname.lower()# hello world'hello '.rstrip()# hello 右边空格' hello'.lstrip()# 左边空格' hello '.strip()# 两边空格