單項(xiàng)選擇題在Python中,如何創(chuàng)建一個(gè)匿名函數(shù)?()

A.lambda
B.anonymous
C.func
D.none


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題在Python中,如何向一個(gè)函數(shù)傳遞不定數(shù)量的參數(shù)?()

A.*args
B.**kwargs
C.varargs
D.A和B都對(duì)

2.單項(xiàng)選擇題在Python中,如何獲取一個(gè)對(duì)象的內(nèi)存地址?()

A.id(obj)
B.address(obj)
C.obj.address()
D.obj.id()

3.單項(xiàng)選擇題在Python中,如何生成一個(gè)0到1之間的隨機(jī)浮點(diǎn)數(shù)?()

A.random.random()
B.random.uniform(0,1)
C.random.randint(0,1)
D.A和B都對(duì)

4.單項(xiàng)選擇題在Python中,如何拋出自定義異常?()

A.raise MyException("message")
B.throw MyException("message")
C.exception MyException("message")
D.new Exception("message")

5.單項(xiàng)選擇題在Python中,如何實(shí)現(xiàn)多線程?()

A.import threading
B.from concurrent.futures import ThreadPoolExecutor
C.from multiprocessing import Process
D.A和B都對(duì)