执行以下代码输出结果的是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 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
- 执行以下代码输出的结果是(<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(“:”.join(a)) A: P:y:t:h:o:n B: Python C: P:y:t:h:o:n: D: :Python
- 执行以下代码输出的是a = 〃Python〃print(a.upper()) A: PYTHON B: python C: Python D: "Python"
- 给出如下代码,可以输出“python”的是 s = 'Python is beautiful!'