以下程序的输出结果是()。(提示:ord("a")=97)list_demo=[1,2,3,4,5,'a','b']print(list_demo[1],list_demo[5])
举一反三
- 以下程序的输出结果是( )。(提示:ord(‘a’)==97) list_a=[1,2,3,4,5,’a’] print(list_a[1],list_a[4])
- 阅读下面的程序:List_demo = [1,2,1,3] Nums = set(list_demo)For i in nums:Print(i , end = “”)程序执行的结果为()
- 以下程序的输出结果是:list = ["1","3" ,"5"]def app(x):list. append(x)app( "7" )print( list)} A: ['1','3','5'] B: ['1','3','5','7'] C: ['7'] D: "1,3,5,7"
- 已知函数定义def demo(a,*b):return b则print(demo(2,3,4,5))输出什么? A: 2 B: (2, 3) C: (2, 3, 4) D: (3, 4, 5)
- 已知函数定义如下,下列哪个调用方法错误?def demo(a,**b):return b A: x = demo(1,2,3,4,5) B: y = demo(2) C: z = demo(a=2,b=3,) D: w = demo(2,b=3,c=4,d=5,)