如下程序的输出结果是:ss = list(set(“jzzszyj”))ss.sort()print(ss)
A. [‘z’, ‘j’, ‘s’, ‘y’]
B. [‘j’, ‘s’, ‘y’, ‘z’]
C. [‘j’, ‘z’, ‘z’, ‘s’, ‘z’, ‘y’, ‘j’]
D. [‘j’, ‘j’, ‘s’, ‘y’, ‘z’, ‘z’, ‘z’]
查看答案
下面代码的输出结果是
A. = [5,1,3,4]print(sorted(a,reverse = True)) [5, 1, 3, 4]
B. [5, 4, 3, 1]
C. [4, 3, 1, 5]
D. [1, 3, 4, 5]
给出以下代码:s = list(“巴老爷有八十八棵芭蕉树,来了八十八个把式要在巴老爷八十八棵芭蕉树下住。老爷拔了八十八棵芭蕉树,不让八十八个把式在八十八棵芭蕉树下住。八十八个把式烧了八十八棵芭蕉树,巴老爷在八十八棵树边哭。”)如下选项中能输出字符“八”出现次数的是
A. print(s.index(“八”))
B. print(s.index(“八”),6)
C. print(s.index(“八”),6,len(s))
D. print(s.count(“八”))
如下程序的输出结果是:ls = [“浣熊”,“豪猪”,“艾草松鸡”,“棉尾兔”,“叉角羚”]x = “豪猪”print(ls.index(x,0))
A. 0
B. -4
C. -3
D. 1
运行如下程序,输出结果的是:str1 = “Nanjing University”str2 = str1[:7] + " Normal " + str1[-10:]print(str2)
A. Normal U
B. Nanjing Normal
C. Normal University
D. Nanjing Normal University