执行以下代码输出的结果是(
) a=”Python
is a beautiful language”
print(a.split())
A: Python
is a beautiful language
B: Python
, is ,a, beautiful, language
C: [‘Python’,‘is’,
‘a’,‘beautiful’, ‘language’]
D: AttributeError:’int’
object has no attribute ‘split’
) a=”Python
is a beautiful language”
print(a.split())
A: Python
is a beautiful language
B: Python
, is ,a, beautiful, language
C: [‘Python’,‘is’,
‘a’,‘beautiful’, ‘language’]
D: AttributeError:’int’
object has no attribute ‘split’
举一反三
- 执行以下代码输出结果的是a = "Python is a beautiful language”print(a.replace("a”, "Y")) A: Python is Y beYutiful lYnguYge B: Python is a beautiful languageY C: aY D: 4
- 执行以下代码输出结果的是a = "Python is a beautiful language”print(a.count("a")) A: 4 B: a C: 3 D: Python is
- s="Thepythonlanguageisamultimodellanguage."[br][/br]print(s.split(''))[br][/br]代码的输出结果是() A: Thepythonlanguageisamultimodellanguage. B: ['The','python','language','is','a','multimodel','language.'] C: Thepythonlanguageisamultimodellanguage. D: 系统报错
- 给出如下代码<br/>s<br/>= 'Python is beautiful!'<br/>可以输出“python”的是 A: print(s[0:6]) B: print(s[0:6].lower()) C: print(s[–21:<br/>–14].lower) D: print(s[:–14])
- I<br/>hope our school will be ____________. A: more<br/>beautiful and more beautiful B: more<br/>beautiful and beautiful C: more<br/>and more beautiful D: beautiful<br/>and beautiful