單項(xiàng)選擇題在Python中,哪個(gè)函數(shù)用于獲取當(dāng)前時(shí)間?()

A.time.now()
B.datetime.now()
C.time.current()
D.datetime.current()


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題在Python中,如何定義無限循環(huán)?()

A.while True
B.for _in infinite
C.loop:continue
D.goto start

2.單項(xiàng)選擇題在Python中,哪個(gè)符號(hào)用于格式化字符串?()

A.%
B..format
C.f-string
D.所有以上的選項(xiàng)

3.單項(xiàng)選擇題在Python中,如何定義一個(gè)不做任何事的函數(shù)?()

A.def func():pass
B.def func():void
C.def func():None
D.def func():continue

4.單項(xiàng)選擇題在Python中,如何使用類屬性?()

A.ClassName.attribute
B.self.attribute
C.obj.attribute
D.B和C都對(duì)

5.單項(xiàng)選擇題在Python中,如何在列表中插入元素?()

A.list.add(index,element)
B.list.append(element)
C.list.insert(index,element)
D.C和B都對(duì)