以下代码的输出结果是__________。print('{:\\^10b}'.format(10))
A. 出错
B. 1010
C. \\\\10\\\\
D. \\\1010\\\
查看答案
以下代码的输出结果是__________。print('{:->8.4}'.format('python程序设计'))
A. ----pyth
B. pyth
C. python程序
D. python程序设计
设str1='python*',语句print(str1.strip())的执行结果是__________。
A. python*
B. python*
C. python*
D. python*
设s1=["1","2","3","4"],语句print("-".join(s1))的执行结果是__________。
A. 1-2-3-4
B. ["1234"]
C. "1234"
D. [1-2-3-4]
设s="abcdef",现要将s字符串中的“c”字符去除,下面__________可以完成该操作。
A. dels[2]
B. s=s[:2]+s[3:]
C. s[:3]="ab"
D. list(s)[:3]="ab"