执行以下代码输出结果的是a = "Python is a beautiful language”print(a.count("a"))
A: 4
B: a
C: 3
D: Python is
A: 4
B: a
C: 3
D: Python is
举一反三
- 执行以下代码输出结果的是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
- 执行以下代码输出的结果是(<br/>) a=”Python<br/>is a beautiful language”<br/>print(a.split()) A: Python<br/>is a beautiful language B: Python<br/>, is ,a, beautiful, language C: [‘Python’,‘is’,<br/>‘a’,‘beautiful’, ‘language’] D: AttributeError:’int’<br/>object has no attribute ‘split’
- 执行以下代码输出的是a = 〃Python〃print(a.upper()) A: PYTHON B: python C: Python D: "Python"
- 以下代码的输出结果是什么print("Python!"[:-1]) A: Python! B: python C: Python D: python!
- 执行下面代码:s = "Python"print(s[3:1:-1])输出结果为()