s='an apple a day'def split(s):return s.split('a')s.split()
A: ['an', 'apple', 'a', 'day']
B: 在函数定义时报错
C: 'an', 'apple', 'a', 'day'
D: 在最后一行报错
A: ['an', 'apple', 'a', 'day']
B: 在函数定义时报错
C: 'an', 'apple', 'a', 'day'
D: 在最后一行报错
举一反三
- 阅读程序,写出下列程序运行结果。def split(s): return s.split('a') s='an apple a day' print(split(s),s.split())
- 关于字符串常用方法的使用,有代码如下:s='Apple is my favorite fruit.'print(s.split(' '))经分析,其输出结果是( )。 A: Apple is my favorite fruit. B: 系统报错 C: ['Apple', 'is', 'my', 'favorite', 'fruit.'] D: Appleismyfavoritefruit.
- _______will keep you healthy. A: Have an apple each day B: Having an apple each day
- One day, _____,Newton saw an apple fall from a tree. A: to sum up B: what’s more C: it is said D: in addition
- —What's your favourite fruit?—Apples. You know, _______ apple a day keeps the doctor away. A: a B: an C: the D: 不填