设str1='python*',语句print(str1.strip())的执行结果是__________。
A: python*
B: python*
C: python*
D: python*
A: python*
B: python*
C: python*
D: python*
举一反三
- 设 str1='python',语句 print(str1.center(10,*)) 的执行结果是______。 A: python**** B: ****python C: **python** D: SyntaxError
- 使用for 语句把 Python 字符串的每个字母依次打印出来,下面哪个选项实现了() A: count=1 for letter in Python: print(“Python的第"+str(count)+"个字母是”+letter) count=count+1 B: count=1 for letter "Python”: print(“Python的第"+str(count)+"个字母是”+letter) count=count+1 C: count=1 for letter in "Python": print(“Python的第"+str(count)+"个字母是”+letter) count=count+1
- 下面哪一行代码的输出结果不是Python3.7() A: print(“Python3.7”) B: print(“Python”+3.7) C: print(“Python”+str(3.7)) D: print(“Python”+“3.7”)
- 语句print("{0:=^20}".format("Python"))输出结果是: ==============Python|=======Python=======|Python|Python==============
- var str = " I love java Java java"; var str1 = str.replace(/java/i,"python"); 则str1的值是(): I love java python java|I love python Java java|I love python Java python|I love python python python