) 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
内容
- 0
给出如下代码<br/>s<br/>= 'Python is Open Source!'<br/>print(s[0:].upper())<br/>上述代码的输出结果是 A: PYTHON IS<br/>OPEN SOURCE! B: PYTHON C: Python is<br/>Open Source! D: PYTHON IS<br/>OPEN SOURCE
- 1
下面Python代码的执行结果是()。[br][/br]a="Python等级考试"[br][/br]b="="[br][/br]c=">"[br][/br]print("{0:{1}{3}{2}}".format(a,b,25,c)) A: ===============Python等级考试 B: Python等级考试=============== C: Python等级考试 D: Python等级考试
- 2
下面代码的输出结果是( )s="The python language is a scripting language."print(s.split(" ")) #引号之间有空格 A: The python language is a scripting language. B: ['The', 'python', 'language', 'is', 'a', 'scripting', 'language.'] C: 'The', 'python', 'language', 'is', 'a', 'scripting', 'language.' D: ['The' 'python' 'language' 'is' 'a' 'scripting' 'language.']
- 3
'PYTHON IS A LANGUAGE'.SPLIT()结果的类型是
- 4
下面代码的执行结果是 "()a="Python等级考试 [br][/br] b="=" [br][/br] c=">" [br][/br] print("{0:{1}{3}{2}}".format(a,b,25,c)) A: ===============Python等级考试 B: Python等级考试 C: Python等级考试 D: Python等级考试===============