list(map(abs,[1,-2,-5]))返回值为()。

题目

list(map(abs,[1,-2,-5]))返回值为()。

  • A、[1,-2,-5]
  • B、[-1,-2,-5]
  • C、[1,2,5]
  • D、[-1,2,5]
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

表达式list(map(list,zip(*[[1,2,3],[4,5,6]])))的值为________________。


正确答案:[[1,4],[2,5],[3,6]]

第2题:

A policy needs to be implemented on Router B so that any traffic sourced from 172.16.10.0/24 will be forwarded to Router C. Which configuration on Router B will achieve the desired effect?()

A.access - list 1 permit 172.16.10.0 0.0.0.255 ! interface e0 ip policy route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 1 72.16.14.4

B.access - list 1 permit 172.16.10.0 0.0.0.255 ! interface s0 ip policy route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 172.16.12.3

C.access - list 1 permit 172.16.10.0 0.0.0.255 ! interface e0 ip polic y route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 172.16.12.2

D.access -list 1 deny 172.16.10.0 0.0.0.255 ! interface s0 ip policy route - map policy ! route - map policy permit 10 match ip address 1 set ip next - hop 172.16.12.2


参考答案:B

第3题:

表达式list(map(lambdax:x+5,[1,2,3,4,5]))的值为______________________。


正确答案:[6,7,8,9,10]

第4题:

以下哪些结果一定是一个一维列表[’1’,’2’,’3’]?()

  • A、list("123")
  • B、map(unicode,range(1,3))
  • C、[("1"),("2"),("3")]
  • D、[("1",),("2",),("3",)]

正确答案:A,C

第5题:

WhatistheorderofpreferenceforthesecommandswhenallofthemareappliedtooneneighborintheBGPinboundfilterdirection?()

A.prefix-list,route-map,filter-list,distributelist

B.route-map,filter-list,prefix-list,distribute-list

C.route-map,distribute-list,prefix-list,filter-list

D.filter-list,prefixlist,route-map,distributelist

E.distributelist,prefix-list,route-map,fitterlist


参考答案:B

第6题:

下面程序的运行结果为( )。def swap(list): temp=list[0] list[0]=list[1] list[1]=templist=[1,2]swap(list)print(list)

A.[1,2]

B.[2,1]

C.[2,2]

D.[1,1]


正确答案:B

第7题:

Refer to the exhibit. A new TAC engineer comes to you for advice. The engineer wants to configure RIPv2 - OSPF two - way redistribution while avoiding routing loops. Which two additio ns to the router B1 configuration should the engineer make?()

A. access - list 40 deny 172.16.1.0 0.0.0.255 access - list 40 permit any router rip redistribute ospf 100 metric 5 distribute- list 40 out ospf 100

B. ip prefix - list rip_routes permit 172. 16.1.16/25 ge 26 le 28 route - map redis - ospf deny 10 match ip address prefix- list rip_routes router rip redistribute ospf 10 route - map redis - ospf subnets

C. ip prefix - list rip - to - ospf permit 10.1.1.8/25 ge 26 le 28 route - map redis - rip deny 20 match i p address prefix - list rip - to - ospf router ospf 100 redistribute rip route - map redis - rip subnets

D. access - list 15 deny 10.1.1.0 0.0.0.63 access - list 15 permit any route - map redis - rip deny 10 match ip address 15 route - map redis - rip permit 20 router os pf 100 redistribute rip route - map redis - rip subnets


参考答案:A, D

第8题:

list(map(str,[1,2,3]))的执行结果为_____________________。


正确答案:[‘1’,‘2’,‘3’]

第9题:

下列算子可以遍历List集合并且没有返回值的是()

  • A、foreach
  • B、reduce
  • C、persist
  • D、map

正确答案:A

第10题:

对于Map("book"->5,"pen"->2).map(m=>m._1->m._2*2)结果说法正确的是?()

  • A、Map("bookbook"->5,"penpen"->2)
  • B、Map("bookbook"->10,"penpen"->4)
  • C、Map("book"->10,"pen"->4)
  • D、Map("book"->5,"pen"->2,"book"->5,"pen"->2)

正确答案:C

更多相关问题