关于字符串常用方法的使用,有代码如下:s='Apple is my favorite fruit.'print(s.split(' '))经分析,其输出结果是( )。
A: Apple is my favorite fruit.
B: 系统报错
C: ['Apple', 'is', 'my', 'favorite', 'fruit.']
D: Appleismyfavoritefruit.
A: Apple is my favorite fruit.
B: 系统报错
C: ['Apple', 'is', 'my', 'favorite', 'fruit.']
D: Appleismyfavoritefruit.
举一反三
- $fruit="apple" echo 'this is an $fruit.'的输出结果是( ) A: this is an $fruit. B: this is an $apple. C: this is an apple. D: this is an .
- 以下代码的执行结果是( )。desserts = ['ice cream', 'chocolate', 'apple crisp', 'cookies'] favorite_dessert = 'apple crisp' for dessert in desserts: if dessert == favorite_dessert: print("%s is my favorite dessert!" % dessert.title()) A: Apple Crisp is my favorite dessert! B: apple Crisp is my favorite dessert! C: ice cream is my favorite dessert! D: chocolate is my favorite dessert!
- 以下代码的输出结果是。 d={‘fruit’:{‘apple’:4,’orange’:10}} print(d.get(‘apple’,’no’))( ) A: 4 B: no C: fruit D: orange
- According to its fruit structure characteristic, an apple should be called a false fruit. [img=1153x427]1803b8138cdda1c.jpg[/img]
- What’s the man’s favorite fruit?