正确答案是:D: `upper()`
### 专业分析:
在 Python 中,处理字符串时有多个内建方法,每个方法都有特定的功能:
1. **split()**:
- 功能:用于将字符串按照指定分隔符进行拆分,返回一个列表。
- 示例:
```python
text = "hello world"
result = text.split()
# result: ['hello', 'world']
```
2. **strip()**:
- 功能:用于移除字符串开头和结尾的空白字符(如空格、换行符)。
- 示例:
```python
text = " hello world "
result = text.strip()
# result: 'hello world'
```
3. **lower()**:
- 功能:用于将字符串中的所有字母字符转换为小写。
- 示例:
```python
text = "Hello World"
result = text.lower()
# result: 'hello world'
```
4. **upper()**:
- 功能:用于将字符串中的所有字母字符转换为大写。
- 示例:
```python
text = "Hello World"
result = text.upper()
# result: 'HELLO WORLD'
```
### 总结:
在给定选项中,只有 `upper()` 方法能够将字符串中的所有字符转换为大写形式,因此正确答案是 D: `upper()`。